PHP replace string help...

Posted by MILESMIBALERR on Stack Overflow See other posts from Stack Overflow or by MILESMIBALERR
Published on 2010-04-07T04:40:20Z Indexed on 2010/04/07 4:43 UTC
Read the original article Hit count: 306

Filed under:
|
|

i am designing a site with a comment system and i would like a twitter like reply system.

The if the user puts @a_registered_username i would like it to become a link to the user's profile.

i think preg_replace is the function needed for this.

$ALL_USERS_ROW *['USERNAME'] is the database query array for all the users and ['USERNAME'] is the username row.

$content is the comment containing the @username

i think this should not be very hard to solve for someone who is good at php.

Does anybody have any idea how to do it?

© Stack Overflow or respective owner

Related posts about php

Related posts about array