Jump to content

getting rid of forward slashes...


mkosmosports

Recommended Posts

Use the str_replace() function:

<?php
$test = "12/12/2007"
$test = str_replace('/','',$test);
echo $test;
?>

 

You can also use a combination of date() and strtotime()

<?php
$test = "12/12/2007";
$test = date('mdY',strtotime($test));
echo $test;
?>

 

Ken

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.