Search
Search Code
replace singular variable assignment with an array loop and variable variables
I found this useful when passing in an array to a function, rather than assigning all the variables in the function manually from the array just loop through each item in the array and asign them that..
for loop set variables $p1,$p2.. etc as blank - variable variables
this will loop through and assign the variable $p1 = ""; to each in the loop so it appends the loop number to the variable name so you end up with $p1 = "value"; $p2 = "value2"; etc, rather than h..
Welcome
This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...
You could also follow me on twitter. I have a couple of youtube channels if you want to see some video related content. RuneScape 3, Minecraft and also a coding channel here Web Dev.
If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕
❤️👩💻🎮

Random Quote
Unknown
Random CSS Property
:user-invalid (:-moz-ui-invalid)
The :user-invalid CSS pseudo-class represents any validated form element whose value isn't valid based on their validation constraints, after the user has interacted with it.:user-invalid css reference