Need Help in building a logic
<p>I need to get all the positions of a character in a string in a form of an array. I know about the php function <code>strpos()</code> but it does not accept an array as an argument.</p>

<p>This is required:</p>

<pre><code>$name = "australia";            //string that needs to be searched
$positions_to_find_for = "a";   // Find all positions of character "a" in an array 
$positions_array = [0,5,8];     // This should be the output that says character "a" comes at positions 0, 5 and 8 in string "australia"
</code></pre>

<p><strong>Question:</strong> What Loops can help me build a function that can help me achieve the required output?</p>
