Board index   FAQ   Search  
Register  Login
Board index PHP PHP General

PHP - Ripping dates from text

General discussions related to php

Moderators: macek, egami, gesf

PHP - Ripping dates from text

Postby epyon158 » Thu Sep 06, 2012 10:24 am

I have a testimonial page with testimonies similar to ->
"Oh my god, i love your soda. After the 5th bottle I had to take 3 ambiens to fall asleep - Some Guy 2/20/2012"

What I want to do is rip the date (2/20/2012) from the text.

Can anyone help me accomplish this?
epyon158
New php-forum User
New php-forum User
 
Posts: 1
Joined: Thu Sep 06, 2012 10:20 am

Re: PHP - Ripping dates from text

Postby johnj » Thu Sep 06, 2012 10:32 pm

read about strpos() and substr() builtin php functions from php.net
johnj
php-forum Super User
php-forum Super User
 
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm


Return to PHP General

Who is online

Users browsing this forum: Google [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.