iceblox Posted May 28, 2008 Share Posted May 28, 2008 Hi All, I have a script which uploads a csv file and replaces cartain data as specified in an array. But im coming across issues when one of the columns have a " or ( ). This is the array code.. $arr = array("Web'n"walk USB modem" => "190", "USB (modem) stick" => "134"); Does any one have any suggestions to fix this. So far I have tried special characters. Link to comment https://forums.phpfreaks.com/topic/107604-array-replace/ Share on other sites More sharing options...
DarkWater Posted May 28, 2008 Share Posted May 28, 2008 Hey, lol. I thought when I fixed this for you, we ran it through mysql_real_escape_string(). o-O Link to comment https://forums.phpfreaks.com/topic/107604-array-replace/#findComment-551509 Share on other sites More sharing options...
iceblox Posted May 28, 2008 Author Share Posted May 28, 2008 Sorry mate, didnt realise you were online. Yeah thats what i thought but the issue still persists.. Parse error: syntax error, unexpected '=', expecting ')' in /usr/local/psa/home/vhosts/site.com/httpdocs/cron/upload-tmobile.php on line 65 Link to comment https://forums.phpfreaks.com/topic/107604-array-replace/#findComment-551512 Share on other sites More sharing options...
DarkWater Posted May 28, 2008 Share Posted May 28, 2008 Show me lines 60-70 please. I think I know what the problem may be. Link to comment https://forums.phpfreaks.com/topic/107604-array-replace/#findComment-551514 Share on other sites More sharing options...
iceblox Posted May 28, 2008 Author Share Posted May 28, 2008 "Flext 20 (18 months)" => "85", "Flext 20 + web'n'walk (18 months)" => "189", "Flext 25 (12 months)" => "146", "Flext 25 (18 months)" => "84", "Flext 25 + BlackBerry (18 months)" => "192", "Flext 25 + web'n'walk (18 months)" => "194", "Flext 25 + web'n'walk + BlackBerry (18 months)" => "190", "Flext 30 (18 months)" => "83", "Flext 30 + web'n'walk (18 months)" => "195", "Flext 35 (12 months)" => "82", "Flext 35 (18 months)" => "145", "Flext 35 + BlackBerry (18 months)" => "197", "Flext 35 + web'n'walk (12 months)" => "144", "Flext 35 + web'n'walk (18 months)" => "143", "Flext 35 + web'n'walk + BlackBerry (18 months)" => "200", "Flext 35 + web'n'walk Max (18 months)" => "199", "Flext 35 + web'n'walk Plus (18 months)" => "198", "Flext 40 (18 months)" => "141", "Flext 50 (18 months)" => "139", Link to comment https://forums.phpfreaks.com/topic/107604-array-replace/#findComment-551515 Share on other sites More sharing options...
DarkWater Posted May 28, 2008 Share Posted May 28, 2008 Which lines errors you? Link to comment https://forums.phpfreaks.com/topic/107604-array-replace/#findComment-551518 Share on other sites More sharing options...
iceblox Posted May 28, 2008 Author Share Posted May 28, 2008 It says 65, which is this one "Flext 25 + web'n'walk (18 months)" => "194", Link to comment https://forums.phpfreaks.com/topic/107604-array-replace/#findComment-551519 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.