Re: Strange hidden string to array conversion
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Sun, 04 Jan 2009 16:01:29 -0500
Hugh Oxford pisze:So what are you trying to achieve with $s = 'A'?
AFAIK, doing that will create an array, and set the fifth element to 'A'.
No, I'm trying to achieve
$s == ' A';
$s = '';
$s  = 'A';
which should be possible according to documentation, but as Curtis wrote
(thanks, Curtis!) array conversion is chosen over string padding.
Sad, but true.
I don't see where the documentation says you can do that. The doc specifies "Characters within strings may be accessed and modified by specifying the zero-based offset of the desired character after the string using square array brackets, as in $str. ".
So you can access characters in the string, but it says nothing about being able to access characters which don't exist.
If you want it equal to ' A', then set it to ' A'.
Remove the "x" from my email address
JDS Computer Training Corp.
- Prev by Date: eigenheimzulage kinder,immobilienfinanzierung wie,immobilien kredit vergleich,eigenheimzulage wohnung,immobilienkredit trotz schufa,hypothek konditionen,bauspardarlehen wie,immobilienkredit zinsvergleich,
- Next by Date: Re: email form injection
- Previous by thread: Re: Strange hidden string to array conversion
- Next by thread: Re: Strange hidden string to array conversion