Jump to content

how to removing illegal characters?


Fog Juice

Recommended Posts

<?php
  $string = "I have values other then 0 45 7 and 432";
  $string = preg_replace('/\D/','',$string);
  echo $string;
?>

 

output:

0457432

 

 

Considering this is the javascript part of phpfreaks.com, I was hoping to get a response with javascript in it lol

Archived

This topic is now archived and is closed to further replies.

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