Mailinglisten-Archive |
Hi Liste,
hat jemand Erfahrungen mit trim und der charlist
---->
You can also specify the characters you want to strip, by means of the
charlist parameter. Simply list all characters that you want to be stripped.
With .. you can specify a range of characters.
---->
ich verstehe das so, daß man z.B. auch '' und "" entfernen kann leider
bringt
folgendes kleines Script eben nicht das strippen von "" und '' mit sich.
Warum -> Hat jemand eine Idee -> es läuft php 4.2.1 auf dem System.
print "<h3>TESTING ..(\")..".dechex(ord('"'))."</h3>";
print "<h3>TESTING ..(')..".dechex(ord("'"))."</h3>";
$optionString="COLS=3 HANDS=\"on\" WARUM='4'";
$optionString=trim($optionString);
$optionPiece=explode(" ",$optionString);
foreach ($optionPiece as $index => $value){
$value=trim($value);
$piece=explode("=",$value);
print "<br>LEEENGTH ".strlen($piece[1]);
$this->option[$piece[0]]=trim($piece[1],"\0x22\0x27");
}
Grüße
Jochen
php::bar PHP Wiki - Listenarchive