Jump to content

MySQL String using substr


maxudaskin

Recommended Posts

I have a (portion of) a script below, the input would be, lets say 20082407. It echos 2008.24. and not the last 2 numbers... any ideas?

 

<?php
$start = substr($row['start'],0,4) . "." . substr($row['start'],5,6) . "." . substr($row['start'],7,;
echo $start;
?>

Link to comment
https://forums.phpfreaks.com/topic/104971-mysql-string-using-substr/
Share on other sites

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.