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)
-   -   Need PHP assistance, please help (https://gfy.com/showthread.php?t=224988)

Friday 01-23-2004 05:26 PM

Need PHP assistance, please help
 
Hi,

I need some assistance, just starting out to play with php and I need to know how to do this:

I have a variable which is a domain name, sometimes it can be domain.com, domain.net domain.whatever I need to know how to strip only what's after the dot and place it in another variable, for example com, net or whatever.

So:

If variable = domain.com then variable1 = .com and go there.

If variable = domain.net then variable1 = .net and go fuckyourself :)

What is the fastest why doing this?

Thanks!

SilverTab 01-23-2004 05:27 PM

Search for the explode() function on php.net :Graucho

jmk 01-23-2004 05:28 PM

http://www.php.net/manual/en/function.explode.php

woj 01-23-2004 05:32 PM

if you only need the extension, function "strstr" may work better...

Friday 01-23-2004 05:38 PM

Thanks SilverTab, jmk and wob for the speedy reply!!!

Much appreciated, have a great weekend :)


All times are GMT -7. The time now is 07:13 AM.

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