HTML5 new form input attributes

HTML5 Attributes HTML5 added the following attributes for <input>: required placeholder min and max autocomplete autofocus form formaction formenctype formmethod formnovalidate formtarget height and width list multiple pattern (regexp) step and the following attributes for <form>: autocomplete novalidate The required attribute The required attribute is a boolean attribute. When present, it specifies that an input Continue reading…

What is a RECURSIVE Function in PHP?

Recursion is a programming technique that allows the programmer to express operations in terms of themselves. In C, this takes the form of a function that calls itself. A useful way to think of recursive functions is to imagine them as a process being performed where one of the instructions is to “repeat the process”. This makes it sound very similar to a loop because it repeats the same code, and in some ways it is similar to looping. On the other hand, recursion makes it easier to express ideas in which the result of the recursive call is necessary to complete the task. Of course, it must be possible for the “process” to sometimes be completed without the recursive call. One simple example is the idea of building a wall that is ten feet high; if I want to build a ten foot high wall, then I will first build a 9 foot high wall, and then add an extra foot of bricks. Conceptually, this is like saying the “build wall” function takes a height and if that height is greater than one, first calls itself to build a lower wall, and then adds one a foot of bricks.