Get url by ID call

Hi, I have this code that removes unnecessary code from a file and I’m wanting to request the url from the tag value by uniqid. So instead of my select box containing the dir to the files, it will request the url by a uniqid.

[php]$h = fopen(“cache/form.txt”, “rt”);

while (!feof($h)) {

$title = trim(fgets($h));
$url = trim(fgets($h)); 
$doesnt_start_with_numbers = preg_replace('#^\d+#', '', $title);

// output
$up_id = uniqid();
$print = print "<option id='$up_id' value='$url'>$doesnt_start_with_numbers</option>\n";

}
fclose($h);[/php]

Well, your line #11 does not make sense. You are assigning a printed line to a variable. ??? Why?
Also, if you really want it assigned to a variable, you should not use reserved words like PRINT!

Normally, you would just do a simple echo there. Although print is okay, too…

Sponsor our Newsletter | Privacy Policy | Terms of Service