Get a number after a character in a string...

Posted by James Rattray on Stack Overflow See other posts from Stack Overflow or by James Rattray
Published on 2010-12-23T22:09:23Z Indexed on 2010/12/23 22:54 UTC
Read the original article Hit count: 188

Filed under:
|

I'm making my own forums and I don't want any BB code on it, but instead my own, so i've gotten [b][u][img] working etc.

But i'm having problems with [quote=1][/quote] where the number is the user id...

E.G lets say I quote someone

So once I submit my post: (The variable $post would be:) '[quote=1] Quoted post :P[/quote]'

How would I then get the number out the string? (But not the wrong number -not a number in the quoted post)

(So I could then use str_replace() to replace with a table which makes it looked quoted)

?? :)

© Stack Overflow or respective owner

Related posts about php

Related posts about regex