1
Array ( [0] => [[["15:30"," ","Alemania","Germany"," Bundesliga: ","Bayer Leverkusen - SC Freiburg"]]] [1] => [[["15:30"," ","Polonia","Poland"," Ekstraklasa: ","MKS Sandecja Nowy Sacz - Termalica Bruk-Bet Nieciecza"]]] [2] => [[["15:30"," ","Rusia","Russia"," Premier League: ","FC Rubin Kazan - FC Ural Yekaterinburg"]]] [3] => [[["16:00"," ","Albania","Albania"," Kategoria Superiore: ","KF Laci - Luftetari Gjirokaster"]]] [4] => [[["16:00"," ","Brasil","Brazil"," Brasileir\u00e3o Serie A: ","Avai SC - Atletico Mineiro MG"]]] 

How can I get the data from this object using php , for example i need to get the time and save it in variable

1 Answer 1

1

if you need the time

assuming you have $myArray

    $myArray =  Array ( [0] => [[["15:30"," ","Alemania","Germany"," Bundesliga: ","Bayer Leverkusen - SC Freiburg"]]] 
          [1] => [[["15:30"," ","Polonia","Poland"," Ekstraklasa: ","MKS Sandecja Nowy Sacz - Termalica Bruk-Bet Nieciecza"]]] 
          [2] => [[["15:30"," ","Rusia","Russia"," Premier League: ","FC Rubin Kazan - FC Ural Yekaterinburg"]]] 
          [3] => [[["16:00"," ","Albania","Albania"," Kategoria Superiore: ","KF Laci - Luftetari Gjirokaster"]]] 
          [4] => [[["16:00"," ","Brasil","Brazil"," Brasileir\u00e3o Serie A: ","Avai SC - Atletico Mineiro MG"]]] );

you could use

    foreach ($myArray as $key => $value) {
      $myTime[$key]=  $value[0][0][0] ;
    }

in $myTime = have an array with only the time

Sign up to request clarification or add additional context in comments.

1 Comment

Hi Bro , Thanks for your solution , I found that I make the array in not correct way , BTW your code is working and thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.