dizzy1 Posted November 26, 2009 Share Posted November 26, 2009 Hi im using phpMyAdmin - 2.11.9.5 and trying to insert into MYSQl using a PHP array: VALUES ( foreach( $array as $key => $Value){ echo "'".$Value."'"; if ($key != $sizeofarray){ echo ","; } } ) Thanks In Advance DIZZY Quote Link to comment https://forums.phpfreaks.com/topic/183017-php-loop-in-mysql/ Share on other sites More sharing options...
fenway Posted November 26, 2009 Share Posted November 26, 2009 Ignoring for the time being that this is likely a poor storage choice, you can build this pseudo-structure in advance, and then just interpolate a simple string. But that's a php syntax question. Quote Link to comment https://forums.phpfreaks.com/topic/183017-php-loop-in-mysql/#findComment-965920 Share on other sites More sharing options...
dizzy1 Posted November 26, 2009 Author Share Posted November 26, 2009 Thanks, how can I delete this post so i don't reproduce in the PHP help section Quote Link to comment https://forums.phpfreaks.com/topic/183017-php-loop-in-mysql/#findComment-965923 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.