A little help with some php
$10-30 USD
Pago na entrega
If you could look at the following and let me know if you would be willing to help would be that would be excellent. Max budget $30 + if you can build ios apps we may have some more work for you at a better rate
Right long story short.... I have been trying to get this API for train times working for months I have finally got it to the point of producing an array but it all seams to be buried within a std class which i cant seam to access.
the outputted data from the api is:
-------------------------------------------------
stdClass Object
(
[GetStationBoardResult] => stdClass Object
(
[generatedAt] => 2015-02-18T20:57:37.1273527+00:00
[locationName] => Milton Keynes Central
[crs] => MKC
[nrccMessages] => stdClass Object
(
[message] => stdClass Object
(
[_] => Trains in the Crewe area are being delayed by up to 45 minutes. More details can be found in Latest Travel News.
)
)
[platformAvailable] => 1
[trainServices] => stdClass Object
(
[service] => Array
(
[0] => stdClass Object
(
[origin] => stdClass Object
(
[location] => stdClass Object
(
[locationName] => London Euston
[crs] => EUS
[via] =>
[futureChangeTo] =>
)
)
[destination] => stdClass Object
(
[location] => stdClass Object
(
[locationName] => Chester
[crs] => CTR
[via] =>
[futureChangeTo] =>
)
)
[std] => 20:41
[etd] => 21:16
[operator] => Virgin Trains
[operatorCode] => VT
[serviceID] => /NAHmMYLVyBB5WhBblmV2Q==
)
[1] => stdClass Object
(
[origin] => stdClass Object
(
[location] => stdClass Object
and so on.
The code is being outputted to the screen via
<?php print_r($departureBoard); ?>
I have tried various different variations of
<?php
foreach($data->GetStationBoardResult->service[0]->origin->location as $item)
{
echo "Location: ".$item->locationName;
}
?>
but cant get it to work.
I would like to be able to access all of the locationname, times etc and display in a simple html table similar to [url removed, login to view]
Im awesome at CSS but php arrays not my strong point lol so dont worry about the styling
the code should be simple to replicate in a similar fashion to calling out rows or variables if possible.
I really hope someone can help
ID do Projeto: #7167835
Sobre o projeto
Concedido a:
hello sir, i can do your project.... please accept my bid so that i can start it... i m expert in this type of project... u can also see my portfolio... please sir accept my bid.. please hope u will do i m waiting f Mais
6 freelancers estão ofertando em média $17 nesse trabalho
Hello, I am experienced in php, php5+,mysql ajax javascript, html,css jquery with more than 3 years of experience and i can do your project now please provide me the details so that i can do your project
Hello, Could you please post the result as raw text (include tab) for nice view? Or send me the source code for this page i will try to complete your work. Thanks.