GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Smarty Question About "Path" (not a biggy i guess) (https://gfy.com/showthread.php?t=1033852)

Inter-Sex 08-12-2011 04:33 AM

Smarty Question About "Path" (not a biggy i guess)
 
Hi,

Got a small smarty script made, and the developper is with holidays right now.
Maby anyone from here is willing to give me the solution.


Code:

$row2['url'] = $_site_www2.'/folder/'.$row2['2_folder'].'-name.ext';
The settings (config.php) of www2 are :

Code:

$_site_www2 = 'http://www.domain2.com';
The directory ['2_folder'] is named like "1XXX1_01" (w/o quotes)

But i need to have the 1XXX1_ deleted from that part of the url, which it output.

How I'd go around that ?

Any help is apreciated,

~ Renaldo,

1080p Content 08-12-2011 05:05 AM

Code:

$row2['url'] = $_site_www2.'/folder/'.str_replace('1XXX1_', '', $row2['2_folder']).'-name.ext';
or if the string you want to remove is always same length but different numbers... i.e. "1XYZ1_"...

Code:

$row2['url'] = $_site_www2.'/folder/'.substr($row2['2_folder'], 6).'-name.ext';

Inter-Sex 08-12-2011 05:22 AM

1080p Content,

Thank you greatly for giving me the solution.
This works like a charm.:thumbsup

You've helped me great,

~ Renaldo,


All times are GMT -7. The time now is 12:56 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123