Hi, Im using the funciton explode, and im trying to split up sites by html, This is my code
$A_array = explode ("<a",$site_string);

but some urls start with <A, how can i split the site both by <a and by <A and put it in the same array, does anyone know, thanks.

    I figured it out, I just did two explode functions one with <a and one with <A, and then just used array_merge, im thinking there must be a way to save more resources.

      Use split(), which is the regular-expression analogue to explode(). In your case:

      $A_array = split ("&lt;[aA]",$site_string);

        Another option is to use strtolower():

        &nbsp;&nbsp;$A_array = explode("&lt;a", strtolower($site_string));

        geoff

          Instead of changing the whole string to lower case, a very simple solution would just be to convert all "<A" to "<a" or vice-versa:

          str_replace("<A","<a",$site_string);

            Write a Reply...