Php replacement problem for ($ I = 0; $ I <20; $ I ++ ){
If ($ rs-> Fields ($ I)-> value = ''){
$ Arr [$ I] = "''";
} Else {
$ Arr [$ I] = $ rs-> Fields ($ I)-> value;
If ($ arr [$ I] = 'telephony '){
$ Arr [$ I] = 5;
}
}
}
Why cannot I replace the phone number?
Reply to discussion (solution)
It may be about character sets.
Do not map, var_dump ($ rs-> Fields); paste this result
Try double quotation marks...
It may be about character sets.
I read it from the access database.
Try double quotation marks...
Still not good
Do not map, var_dump ($ rs-> Fields); paste this result
The result is variant Object.
Character set problems may occur no matter where it comes from.
Var_dump ($ arr );
Post result
It may be about character sets.
I read it from the access database.
Character set problems may occur no matter where it comes from.
Var_dump ($ arr );
Post result
It may be about character sets.
I read it from the access database.
Var_dump indicates that the memory cannot be read.
Try
$ Arr [$ I] = $ rs-> Fields ($ I)-> value;
Change
$ Arr [$ I] = strval ($ rs-> Fields ($ I)-> value );
Try
$ Arr [$ I] = $ rs-> Fields ($ I)-> value;
Change
$ Arr [$ I] = strval ($ rs-> Fields ($ I)-> value );
The same
Array ([0] => 502 [1] => 10121001 [2] => schedule a check in mid-December. Return visit: shutdown [3] => male [4] => 50 [5] => 13610956510 [6] => 0 [7] => sexual dysfunction [8] => Check [9] => Li Wei [10] => 0 [11] => 2010-12-15 [12] => 2010-10-14 [13] => 10-14 [14] => 0 [15] => 0 [16] => 23:36:01 [17] => 1 [18] => Consulting [19] => phone number)