Got this from the random pic tutorial here. I'm getting Parse error: parse error, unexpected '\"', expecting ',' or ';' The following is line 23: echo "<img src="".$file_dir."/".$arry_txt[rand(0, sizeof($arry_txt) -1)]."">"; So what went wrong? I'm still really new at php. Tried taking out the / and quotes, but nothing. [code]<? // #### RANDOM PIC ######################################### $thumbstring = ''; $file_dir="pics/a10"; // DIRECTORY WITH THE PICS $f_type="tm.jpg"; // FILE EXTENSION YOU WISH TO DISPLAY $dir=opendir($file_dir); while ($file=readdir($dir)) { if ($file != "." && $file != "..") { $extension=substr($file,-6); // THIS DIGIT MUST MATCH THE NUMBER OF CHARACTERS SPECIFIED IN THE FILE EXTENSION ABOVE if($extension == $f_type) { $thumbstring .= "$file|"; } } } srand((double)microtime()*1000000); $arry_txt = explode("|" , $thumbstring); echo "<img src="".$file_dir."/".$arry_txt[rand(0, sizeof($arry_txt) -1)]."">"; // #### END RANDOM PIC ######################################### ?>[/code]