hai guys, As i am a newbie i want to check a file path is an image or not \[code\]<? if(strpos($row['dfilepath'],'jpg') != false) { <img src="http://stackoverflow.com/questions/2117514/<?= base_url().'/uploads/'.$row['dFilePath']?>" /> } else { <input type="button" onclick="loaddetails('<?php echo $row['dFilePath'];?>');" value="http://stackoverflow.com/questions/2117514/<?php echo $row['dFilePath'];?>"> } ?> \[/code\]whether my condition is correct or not..My error\[quote\] unexpected '<'\[/quote\]