Jump to content

Superian

Members
  • Posts

    66
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Superian's Achievements

Member

Member (2/5)

0

Reputation

  1. Thanks wildteen88! With your code, I do no have to use the function!
  2. After each period 01. Plies - Chef (3:28) 02. Plies Feat. Mario & Hurricane Chris - Headboard (3:33) 03. Plies - On Yac (0:49)
  3. This should be simple, but I am having a hard time figuring this thing out! I have a textarea that I am trying to insert multiple values into. <form action="music.php" method="post" > <textarea name="tracks" rows="15" cols="20" id="" tabindex="3" class="" style="width: 300px;"></textarea> <input type="submit" name="submit_tracks" value="Music"> </form> I am having problems placing the results into an array. What am I doing wrong? <?php if($_POST['submit_tracks']) { //This is the array containing the track information $tracklisting = $_POST['tracks']; $tracklisting = array(); //This is the function which will grab anything after the . and return it function trackname($string){ $file = $string; $i = strrpos($file,'.'); $trackname = substr($file,$i+1); return $trackname; } foreach($tracklisting as $track) { $trackoutput = trackname($track); print "<li>".$trackoutput."</li>"; } } else print "No Output!"; ?>
  4. I am trying to write a script that will search for the period(.) in the string below and print everything that follows the period to the screen inside a "list tags". There will multiple tracks that will be needed to print to the screen. <?php $str = " 01. Plies - Chef (3:28) 02. Lil Wayne - U-Stream Freestyle (1:51) "; if(preg_match("/./i", $str)){ for ($i = 0; $i < count($str); $i++) { print "<li>".$str[$i]."</li>"; } } else { print " No Match"; } ?>
  5. Where are you attending class for the flash video player?
  6. http://publicsize.com How much do you think the site should be sold for? I would just sale the site for my price and be done with it.
  7. How could I make this into one function instead of having to use two? <?php function check_plain($text) { return _validate_utf8($text) ? htmlspecialchars($text, ENT_QUOTES) : ''; } function _validate_utf8($text) { if (strlen($text) == 0) { return TRUE; } return (preg_match('/^./us', $text) == 1); } ?>
  8. I am trying to write a script that checks whether a string is valid UTF-8, but I have no idea where to start. Any ideas? Thanks!
  9. It doesn't display any output still! Any help please!
  10. I'm sorry, but I am lost buddy. Getting an error! <?php function unset_register_globals() { if (ini_get('register_globals')) { foreach ($GLOBALS as $key => $value) { if (!in_array($key, array('_ENV' => 1, '_GET' => 1, '_POST' => 1, '_COOKIE' => 1, '_FILES' => 1, '_SERVER' => 1, '_REQUEST' => 1, 'GLOBALS' => 1))) { unset($GLOBALS[$key]); } else ($GLOBALS[$key] == false) { print "Unset"; } } } } unset_register_globals(); ?>
  11. Could someone please give me an idea about how to check the following script to see if its working properly? Thanks! <?php function unset_register_globals() { if (ini_get('register_globals')) { foreach ($GLOBALS as $key => $value) { if (!in_array($key, array('_ENV' => 1, '_GET' => 1, '_POST' => 1, '_COOKIE' => 1, '_FILES' => 1, '_SERVER' => 1, '_REQUEST' => 1, 'GLOBALS' => 1))) { unset($GLOBALS[$key]); } } } } ?>
  12. (such functions are glob or mysql_fetch_object) I understand the mysql_fetch_object, but what do you mean by glob with in a function?
  13. There isn't a method nor is there a class!
×
×
  • 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.