Jump to content

phpretard

Members
  • Posts

    821
  • Joined

  • Last visited

    Never

Posts posted by phpretard

  1. The code below wont give the desired result.

     

    while($row = mysql_fetch_array($result))
    
      {
      $url=$row['url'];
      $id=$row['id'];
      $num="0";
      
      $pic="messages[$num] = new Array('../$url');";  
    
    echo $pic;
    
    $num++;
    
    }
    

     

    the desired result is

     

    messages[0] = new Array('../$url');

    messages[1] = new Array('../$url'); 

    messages[2] = new Array('../$url'); 

    messages[3] = new Array('../$url'); and so on...

     

    Can someone please throw a bone here?

     

    -Anthony

  2. The datbase id set to default like this 0000-00-00.

     

    I would like to display the date like this 02-14-08.

     

    The code below doesn't work (I am sure this is obvious to someone).

     

    $date= $row['date'];
    $date1=date_format($date, '%m %d %y');
    
    echo $date1 ;
    

     

    Please help me...

     

    -Anthony

     

     

  3. I am simple trying to submit a form and email the information from it.  I can do that no sweat.  I just know there must be a better way then to type $_post['info'] for every field.  I have about 40 fields.

     

    This isn't detramental, I just would like to know if there is a better way.

     

    Thanks a million!

     

    -Anthony

  4. The code below puts the number 125 before the number 25 when sorted asc.  I am pretty sure it's because of the 1 in 125.

     

    I would like to arrange asc with the 25 first because these aren't the only numbers involved.

     

    Has anyone run into this before?

     

    $result = mysql_query("SELECT * FROM rentals ORDER by $var");

     

     

    Any help ??

  5. Is there any way you could translate that?

     

    $url=unserialize($row['url']);
    $name=unserialize($row['name']);
    
    $link=$url;
    $link_name=$name;
    
    $narray=array_combine($link,$link_name);
    foreach($narray as $key => $item) echo "<a href=\"$key\">$item</a>";
    
    

     

    Thank you for your quick response!

  6. What does this mean?

     

    Fatal error: Call to undefined function: array_combine()

     

    $url=unserialize($row['url']);
    $name=unserialize($row['name']);
    
    $link=$url;
    $link_name=$name;
    
    $narray=array_combine($link,$link_name);
    foreach($narray as $key => $item) echo "<a href=\"$key\">$item</a>";

  7. I (once again) wasn't as clear with my question but your answer was dead on.

     

    I need one array's value as the url and the other as the link name.

     

    
    while()
    
    {
    
    foreach($link as $value);
    foreach($link_name as $value1);
    
    echo "<a href=$value>$value1</a>";
    
    }
    

     

     

    btw - Thank you for your quick response.

  8. I serialized input from a form, inserted the serialized data, unserialized the data and echoed it.

     

    It echoed an array and I dont know how to seperate the information so I can use it.

     

    I need to output the "add_player.php" part of this like so -<a href='http://www.website.com/add_player.php'>

    array(4) { [0]=> string(14) "add_player.php" [1]=> string( "rand.php" [2]=> string(10) "roster.php" [3]=> string( "menu.php" } Array
    

     

    Can someone help seperate this stuff please?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.