w1ww Posted August 30, 2008 Share Posted August 30, 2008 Hello, I've a quick question: $cats = array(1,2,3); and $b = 1,2,3; array($b); They produce different results, but what I want is that when I do array($b) it should show work as array(1,2,3) and it shouldnt turn the first position of the array in 1,2,3. I hope this is clear. Thank you help Link to comment https://forums.phpfreaks.com/topic/121997-solved-basic-array-question/ Share on other sites More sharing options...
.josh Posted August 30, 2008 Share Posted August 30, 2008 assuming that by $b = 1,2,3; you really meant $b = "1,2,3"; just explode $b Link to comment https://forums.phpfreaks.com/topic/121997-solved-basic-array-question/#findComment-629702 Share on other sites More sharing options...
w1ww Posted August 30, 2008 Author Share Posted August 30, 2008 Oh yes, I see. Thank you! Just learned a new thing ! Link to comment https://forums.phpfreaks.com/topic/121997-solved-basic-array-question/#findComment-629705 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.