:: Cannot re-assign $this

:: Error message
"Cannot re-assign $this blablabla" on PHP5 script.

:: Solution
Change variable $this to $value

:: Example
from:
 foreach ($p_arr as $this) {
$p_char = ( $i%3==0 ? "r" : ( $i%3==1 ? "w" : "x" ) );
$perms .= ( $this=="1" ? $p_char : "-" ) . ( $i%3==2 ? " " : "" );
$i++;
}

change to :
 foreach ($p_arr as $value) {
$p_char = ( $i%3==0 ? "r" : ( $i%3==1 ? "w" : "x" ) );
$perms .= ( $value=="1" ? $p_char : "-" ) . ( $i%3==2 ? " " : "" );
$i++;
}

:: Links
+ GoogleLinux
+ PHP5

0 komentar:

Post a Comment

:: Cheap Web Hosting :: ~ only from Rp. 900/mo; 250Mb/mo of Bandwidth ~ :: Web Hosting Murah Meriah :: ~ mulai dari Rp. 900/bln; Bandwidth 250Mb/bln ~