Jump to content

Push Eject

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Push Eject's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. LOL - isn't that what I posted in my first reply?
  2. I'm sorry, your subject is how to the last record in a set of records... I should have read your post thoroughly.
  3. $sql = "SELECT * FROM X WHERE Y LIKE '%$search_query%' ORDER BY Z DESC";
  4. SELECT * FROM table ORDER BY yourchoice DESC LIMIT 1
  5. The reason for "!== false" instead of "!= false" is a statement can evaluate to 0 and still be true. e.g. $found = strpos( "Hello World!", "H")
  6. I just went through this. Perhaps this will help you: <?php $body = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '<a href="\\1">\\1</a>', $body); $body = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)', '\\1<a href="http://\\2">\\2</a>', $body); ?>
  7. Does this help? <tr> <td width="%16"><font face="verdana" size="2"><?php echo $liste[0]; ?></font></td> <td width="%16"><font face="verdana" size="2"><?php echo $liste[1]; ?></font></td> <td width="%17"><font face="verdana" size="2"><?php echo $liste[2]; ?></font></td> <td width="%13"><font face="verdana" size="2"><?php echo $liste[3]; ?></font></td> <td width="%21"><font face="verdana" size="2"><?php echo $liste[4]; ?></font></td> <td width="%17"><font face="verdana" size="2"><?php echo $liste[5]; ?></font></td> </tr>
  8. It seems to me the problem is that the $Filter_Item array and the $I_EquipID array are not ordinally related. Nor should they need to be, I don't think. I'm not sure how $Filter_Item is being populated, but perhaps something like this will work for you: <?php $I_Count=count($I_EquipID); for($x=0;$x<$I_Count;$x++) { if(isset($E_H_Equip)) { echo "<option"; foreach( $Filter_Item as $item ){ if( $I_EquipID[$x] == $item ) echo " SELECTED"; } echo " value='".$I_EquipID[$x]."'>*".$I_No[$x]." | ".$I_Description[$x]."</option>"; } else { echo("<option value='".$I_EquipID[$x]."'>".$I_No[$x]." | ".$I_Description[$x]."</option>"); } } ?>
  9. Thanks Disco! I *just* found that function myself and here is my solution: <?php $body = preg_replace_callback('([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})', 'encodeEmail', $body); function encodeEmail($email){ $t = $email[0]; $r = ""; for( $i = 0; $i < strlen($t); $i++ ){ $r .= "&" . "#" . ord( substr($t,$i,1) ); } $r = "<a href=\"&#109a&#105l&#116o&#58" . $r . "\">".$r."</a>"; return $r; } ?>
  10. Hmm. Sorry about that. Can you echo $data and $number and compare their contents? That might give insight into why strpos() didn't find a match.
  11. Just a quick observation, you are relying on $x for all your key needs. I think you are going to need to use another variable within your loop to iterate through the second array checking for a match.
  12. <?php // Parse text file for blocked numbers $handle = fopen("blocked.txt", "r"); $data = fread( $handle, filesize( "blocked.txt" ) ); if( strpos( $data, $number ) !== false ){ $error = "That number is blocked on this system"; } fclose($handle); ?>
×
×
  • 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.