EchoFool Posted March 22, 2010 Share Posted March 22, 2010 Hey, If i return mysql_fetch_assoc($Query); In my function and the call it on my script like this: $array = function(); How would i use the array because i tried $array[0] to echo the first field selected from the query but i get an offset error. So im assuming mysql_fetch_assoc returns an array in a different type ? Link to comment https://forums.phpfreaks.com/topic/196177-array-returns-in-functions/ Share on other sites More sharing options...
Alex Posted March 22, 2010 Share Posted March 22, 2010 mysql_fetch_assoc, as the name suggests, returns an associative array. You might be looking for mysql_fetch_row. Link to comment https://forums.phpfreaks.com/topic/196177-array-returns-in-functions/#findComment-1030217 Share on other sites More sharing options...
EchoFool Posted March 22, 2010 Author Share Posted March 22, 2010 Oh i see - thank you AlexWD Link to comment https://forums.phpfreaks.com/topic/196177-array-returns-in-functions/#findComment-1030228 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.