Jump to content

Settype array to "string"


rhijaen

Recommended Posts

I'm having a problem..some of the values in my array are integer and some are "supposed" to be string. Though I think since the first are integer, when it gets to filling in a string, it knows it's not an integer so it passes 0 to the array value.

 

Here's an example:

while($newArray = mysql_fetch_array($result)){	
$b_p_light[$count] = $newArray['b_p_light'];
$count++;
}

 

When it gets to a string, it returns it as 0. How can I fix this to have it all strings or some integer and some string?

Link to comment
https://forums.phpfreaks.com/topic/131019-settype-array-to-string/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.