redarrow Posted March 12, 2007 Share Posted March 12, 2007 it hard to exsplain but i see a lot of code woth the array like this $name=array(); can you exsplain the concept please cheers. dont exsplain harshly nice and gently lol. Link to comment https://forums.phpfreaks.com/topic/42285-solved-array-want-to-no-help-cheers/ Share on other sites More sharing options...
trq Posted March 12, 2007 Share Posted March 12, 2007 That defines an empty array. Take a look at the array function. Link to comment https://forums.phpfreaks.com/topic/42285-solved-array-want-to-no-help-cheers/#findComment-205112 Share on other sites More sharing options...
redarrow Posted March 12, 2007 Author Share Posted March 12, 2007 just another way to do an array ? oh well cheers. <?php $x=array(); $a[0]="my"; $a[1]="name"; $a[2]="is"; $a[3]="redarrow"; <?php $a=array(); $a[]="my"; $a[]="name"; $a[]="is"; $a[]="redarrow"; foreach($a as $go){ echo "$go<br>"; } ?> result Array ( [0] => my [1] => name [2] => is [3] => redarrow ) Link to comment https://forums.phpfreaks.com/topic/42285-solved-array-want-to-no-help-cheers/#findComment-205123 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.