Search found 2 matches

by katanga
Sat Jul 10, 2004 6:54 am
Forum: PHP - Code
Topic: convert str to int
Replies: 4
Views: 794

sami: thx but I already tried converting it to and integer that way, look @ my comment in code. Tried it with *1, +1 and (int). max: thx, idd I tried to get the max of an array but it doesn't work, it's some kind of conflict with the string to integer converting. result: Array ( [0] => 15 [1] => 3 [...
by katanga
Fri Jul 09, 2004 6:13 pm
Forum: PHP - Code
Topic: convert str to int
Replies: 4
Views: 794

convert str to int

<? $highest=0; foreach($s_data as $sub_rec) { list($id, $naam, $bericht) = $sub_rec; /* $convert=1; $id=$id*$convert; $id=(int)$id;*/ if($$highest<$id) { $$highest=$id; } } ?> I've used the function implode() to store everything in a var, after that I stored the data into a 2 dimensional array $s_d...