seran128 Posted November 28, 2006 Share Posted November 28, 2006 I have a table that holds the path to a filehome/myname/public_html/site1/Images/bbd61948840809e5a0d83b3cf21bdd47.pngWhat I want to do is cut the home/myname/public_html/site1/Images/My code that gets the results is <td colspan="2" class="Results" ><img src="<? echo $info[0]['ImagePath1'] ?>"></td>and this returnsa broken image and the properties of that image ishttp://mydomain.com/home/myname/public_html/site1/Images/bbd61948840809e5a0d83b3cf21bdd47.png Quote Link to comment Share on other sites More sharing options...
Orio Posted November 28, 2006 Share Posted November 28, 2006 If it's the same all the time (the part you want to remove) you can do something like this:[code]<?php//$path holds the full path (IE "home/myname....fhed.png")$len = strlen("home/myname/public_html/site1/Images/");$file_name=substr($path,$len);echo $file_name;?>[/code]Orio. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.