Need PHP assistance, please help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Friday
    Confirmed User
    • Apr 2002
    • 157

    #1

    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
    Confirmed User
    • Nov 2001
    • 5060

    #2
    Search for the explode() function on php.net
    mmm my sig was too big... no more cool animation
    but hey still! need php? ICQ: 94586959

    Comment

    • jmk
      Confirmed User
      • Sep 2002
      • 5391

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

      Comment

      • woj
        <&(©¿©)&>
        • Jul 2002
        • 47882

        #4
        if you only need the extension, function "strstr" may work better...
        Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
        Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
        Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

        Comment

        • Friday
          Confirmed User
          • Apr 2002
          • 157

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

          Much appreciated, have a great weekend
          ...

          Comment

          Working...