• I have a string that includes a tag (that needs to be replaced), however the tag is not fixed, though it has a fixed mask: tag-name(%parameter).
    Ok.. now the hard part. Is there a PHP function that will return such substrings, i.e. all substrings that match a certain mask?
    What I want to accomplish is to replace the tag with some text, based on the specified parameter.
    Thank you kindly for any suggestions,
    icxn

Viewing 2 replies - 1 through 2 (of 2 total)
  • What about preg_replace_callback?

    Thread Starter Anonymous

    Thank you very much.. 🙂
    Now the problem is to figure out the right pattern (regular expression), to allow for:
    <mytag>,
    <mytag=keyword>, (ex. <mytag=5> or <mytag=’some text’>)
    <mytag=keyword1, keyword2…> (ex. <mytag=5, ‘some text’>)
    I ask a lot… I know 🙂
    icxn

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP question’ is closed to new replies.