removing characters

From: Date: Tue, 06 Mar 2001 05:20:55 +0000
Subject: removing characters
Groups: php.general 
Request: Send a blank email to php-general+get-42705@lists.php.net to get a copy of this message
A problem of inexperience... I am trying to store an array in mysql. I obtain the array like so-- $partcount = count($Area); reset($Area); for ($i = 0; $i < $partcount; $i++){ $key = key($Area); $val = $Area[$key]; $string1 .= $val . "\') or (Area=\'"; next($Area); } This results, with a bit of coaxing, in an array like this one -- +-----------------------------------------------------+ | Area | +-----------------------------------------------------+ | (Area='1') or (Area='2') or (Area='3') or (Area='') | +-----------------------------------------------------+ Everything is falling into place, *except* these last thirteen characters -- or (Area='') And that's what I'd like to eradicate. Tips, suggestions, especially outright code greatly appreciate. Thanks, Robert p.s.-- I have ordered the Friedl book on Regular Expressions. Hoping it will enlighten me for the future

« previous php.general (#42705) next »