Created
July 2, 2013 16:47
-
-
Save LucienLee/5910989 to your computer and use it in GitHub Desktop.
php array with array and something else
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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