Quantcast
Channel: Tech Support Guy
Viewing all articles
Browse latest Browse all 29110

Php Implode function not working

$
0
0
Hi.

I have a variable variable called
Code:

${'stringstack_'.$categoryno} = array();
Im new to the variable variable thing..

And Im trying to implode that array but for some reason it wont work (I think because of the use of a variable variable)

Code:

foreach ($categorynos as $categoryno)
  {
  implode("','",${'stringstack_'.$categoryno});
}

I can directly echo variables from the array. and use count on the array..
Code:

  echo ${'stringstack_'.$categoryno}[0];
  echo count(${'stringstack_'.$categoryno});

that works fine for some reason

Viewing all articles
Browse latest Browse all 29110

Trending Articles