Hiii Everyone,
I have 4 options for each question.Each string Is carrying Lengthy sentences.My variables will be like option1,option2,option3,option4.I want to shuffle this variable order like 3,2,1,4 or similarly it will shuffle like random function.I searched in many way Random() function used for numbers and I saw str_shuffle() it will shuffle only one string that two with string collapse.I want just to rearrange strings order .Is this possible with PHP.If its so please help me with Solution.Thanks in advance.
Put variables in an array and then shuffle the array
This will output something like:
Its better to use an array to achieve this.
You can access the options like this (The order will be random);