[SOLVED] How do I get part of a returned string?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

oops.. sorry, I gave you the wrong expression.. use this (actually tested):

Code: Select all

<?php
	$p_Image = 'G:\\\\Clients\\\\Dare2\\\\_images\\\\prices\\\\title_prices.gif';
    $ImageName = preg_replace('#^.*[/\\\\\\\\]#', '\\\\1', $p_Image);
    $ImagePath = "_images/db_titles/" . $ImageName;
?>
Seona
Forum Commoner
Posts: 33
Joined: Wed Dec 08, 2004 11:04 pm

Post by Seona »

Yay! It works now. Thank you so very much for all your help this afternoon. :)
Post Reply