Jump to content

harristweed

Members
  • Posts

    346
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by harristweed

  1. best I can do is:

    <?php$seach_items=array();
      $search = "PLEl25o5";
      $seach_items[]=$search;
      $swap=array(1=>"l", 5=>"s", 0=>"o", l=>"1", o=>"0", s=>"5");
      foreach ($swap as $key => $value) {
      if(strpos($search,"$key")){
      $seach_items[]=str_replace("$key","$value","$search");
      }
      }
    $query="('". implode("' or '",$seach_items)."')";
    echo"$query";
    ?>

    my excuse is i'm old!

  2. does this point you in the right direction?

    <?php
    $xml_feed="http://server1.thezach.net/examplewarn.xml";
    if($xml = simplexml_load_file("$xml_feed")){
    foreach($xml->info->area->geocode as $number){
    $value=$number->value;
    echo"value = $value<br />\n";
        }
    }
    ?>

  3. The \ in this line is escaping the quote, you need to add another quote!

    if (!is_dir($base."/".$get_album) || strstr($get_album,".") !=NULL || strstr($get_album,"/") !=NULL || strstr($get_album,"\") !=NULL)  

     

    Add quote:

    if (!is_dir($base."/".$get_album) || strstr($get_album,".") !=NULL || strstr($get_album,"/") !=NULL || strstr($get_album,"\"") !=NULL) 
  4. you have a brace } in the wrong place! try:

      while($row = mysql_fetch_assoc($query1))
    {
    $rowdate = $row['date'];
    if($selecteddate == $rowdate)
    {
    echo "Date already Exists";
    }
    
    else
    {
    // form insertion data code here which i have and working fine
    }
    }

  5. I would find the space after the first 30 characters like this:

    $question = stripslashes($row['question']);
    $offset =strpos ( $question , " " ,30) ;
    $string = substr ($question ,0,$offset);
    

    Also in your code I do not see how the question is added to the $string variable!

  6. too scale:

    	$old_width = $size[0];
    $old_height = $size[1];
    
    $thumbnail_width = 670;
    $thumbnail_height = ($old_height * $thumbnail_width / $old_width);

     

    Quality:

    change:

    $destination_handle = ImageCreate ( $thumbnail_width, $thumbnail_height );

    to:

    $destination_handle = imagecreatetruecolor( $thumbnail_width, $thumbnail_height );

×
×
  • 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.