Jump to content

theglobe

New Members
  • Posts

    6
  • Joined

  • Last visited

theglobe's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Just add this css code: @media (min-width: 992px) .intro-title strong:after { background-color: !transparent }
  2. foreach ($newdata as $key => $value){ if(!is_array($value)){ if($value == " " || $value == 'N/A'){ unset($newdata[$key]); } }else { if($key == " " || $key == 'N/A'){ unset($newdata[$key]); } } } i changed and took ddata, now it deleted the [DOB] since it was NULL, but it didnt remove [middle] that is inside [name]
  3. $data has the $key and key value pair, but i dont know how to access the [first], and [middle]
  4. i dont know what you mean. but thanks for the help
  5. There are still elements in the array with blank spaces. Not sure if i am missing something here <?php $ch= curl_init('https://coderbyte.com/api/challenges/json/json-cleaning'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_HEADER, 0); $data = curl_exec($ch); $newdata = json_decode($data,true); foreach ($newdata as $key => $value) { if(is_array($value)) { foreach ($value as $about => $ddata) { if($ddata == "" || $ddata == 'N/A' || $ddata == '-' ) { unset($value[$about]); } } } else{ if($value == "" || $value == 'N/A' || $value == '-' ) { unset($newdata[$key]); } } } var_dump($newdata); curl_close($ch); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.