Skip to content

Instantly share code, notes, and snippets.

@LucienLee
Created July 2, 2013 16:47
Show Gist options
  • Save LucienLee/5910989 to your computer and use it in GitHub Desktop.
Save LucienLee/5910989 to your computer and use it in GitHub Desktop.
php array with array and something else
<?php
$v = array('a', 'b',
array('c', 'd' )
,array('e', 'f'));
foreach ($v as $values)
{
if(is_array($values)){
foreach ($values as $value)
{
echo $value, "<br>" ;
}
}else{
echo $values, "<br>" ;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment