Jump to content

Falakistan

New Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Falakistan

  1. foreach (glob("*.txt") as $filename) { echo '<a href="$filename">$filename</a><br>'; } This code will scan the current directory for txt files and return the file names. You can use these names as anchor tags. You can change the extension ".txt" with your desired extension or use * for any extension
  2. <?php $string="123 abc 45"; preg_match_all("%[0-9]{1,}%",$string,$matches); foreach($matches[0] as $number) { echo $number."<br>"; } ?>
×
×
  • 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.