Skip to content

Tag: php

Modulus in a PHP loop

I’m currently checking whether an entry in a loop is the third iteration or not, with the following code: How can I check if the loop is in its second and not its third iteration? I have tried $i % 2 == 1 to no avail. Answer Modulus checks what’s the leftover of a division. If $i is 10, 10/2

PHP function missing argument error

My validate function looks like that Function call example As you see, my validate function has 3 input vars. I’m not using second var – $data2 often, that’s why set it to 0 by default. But when I’m calling this function as given example (as far as I know it means $data=$lname, $data2=…

hiding the URL address in the address bar

I want to hide the url of the address bar but i have no idea how to do it, i have done some searching but found nothing. On my website i want people to just see www.roundaboutmk.com on every page, no matter what link/button they click on. for example, if they click on the “login” button it will ta…