PHP program which extracts attribute lists from custom tag
Here are some things I noticed:


The function splitByDelimiter() is no more than a wrapper around explode(). Why not use explode() directly?
The function stripQuotes($str) can be a lot shorter: trim($str," '\"");. Note: You should never use ' or " inside attributes, use their HTML equivalents.
Inside parseAnswerTag() you use a foreach loop. Inside it you assign values back into $arr, but under the wrong keys because array_slice() will have generated new numeric keys.
I don't understand why you select for scale and point?


I'm sorry but I cannot help you with other details, because I'm unsure about the origin of the HTML, and what you exactly are trying to accomplish. I did make a shorter version of your function:

function parseAnswerTag($tag)
{
    $inside = trim($tag,'&lt;&gt; ');
    $input  = explode(' ',$inside);
    array_shift($input);
    foreach ($input as $attr)
    {
        $parts = explode('=',$attr);
        $name  = trim($parts[0]);
        $value = trim($parts[1]," '\"");
        $output[$name] = $value;
    }
    return $output;
}

echo '&lt;pre&gt;';
print_r(parseAnswerTag('&lt;answer scale="10" points="7"&gt;'));
echo '&lt;/pre&gt;';


So trimming can be very useful.

Keep in mind: Algorithms like these are almost always slightly flawed. A simple thing like a double space could trip it up. It's very hard to get it completely right. Especially if you make it complicated or use regular expressions.

I also have to point out that PHP has a build in DOM to deal with HTML code. You can load HTML into it, and manipulate it there. See:

http://php.net/manual/en/class.domdocument.php

In more complex cases this is the preferred way to deal with HTML.