Array Preliminary
<?PHP$ereg= ' TM '; $str= ' Hello,tm,tm,tm,tm. '; $rep _str=Eregi_replace($ereg, ' TM ',$str); Echo $rep _str; Echo' <br> '; $ereg 2= ' is '; $str 2= ' This was a register book. '; $arr _str2=Split($ereg 2,$str 2); Var_dump($arr _str2); Echo' <br> '; $array=Array("ASP", "PHP", "JSP"); Print_r($array); Echo' <br> '; Echo $array[0]; Echo' <br> '; $array 2=Array("1" = "series", "2" = "Cheng", "3" and "CI", "4" and "Code"); Print_r($array 2); Echo' <br> '; Echo $array 2[1]; $array 2[5] = "good"; Echo' <br> '; Print_r($array 2); Echo' <br> '; $newarray=Array("First" =>1, "second" =>2, "third" = 3); Echo $newarray["Second"]; $newarray["Third"] = 8; Echo $newarray["Third"]; Echo' <br> '; foreach($array 2 as $array 2s) { Echo $array 2s.‘ <br><br> '; } while(List($num,$value) = each($newarray)) { Echo"$num=$value<br> "; }?>
Does this even make PHP? -4