SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2002
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    strstr fucntion not working

    Cant figure out whats wrong with this
    Thanks
    Maybe there is an easier way. eventually $agency will be plugged into where "orca" is currently located.

    while($i = mysql_fetch_row($result)) {
    echo $i[1];
    echo "\n";
    print "<br>";
    if (strstr($[1],"www."))
    $agency = "this is it";

    }
    print "<hr>";
    echo $agency;
    print "<a href=http://www.orca.state.tx.us>AGENCY WEBSITE</a>";

  2. #2
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    Canada
    Posts
    174
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why don't you try something like this:

    PHP Code:
    while($i mysql_fetch_row($result)) { 
    $stuff $i['1'];
    echo 
    $stuff
    echo 
    "\n"
    print 
    "<br>"
    if (
    strstr($stuff,"www.")) 
    $agency "this is it"


    print 
    "<hr>"
    echo 
    $agency
    print 
    "<a href=http://www.orca.state.tx.us>AGENCY WEBSITE</a>"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •