Skip to content
Advertisement

Tag: element

Getting value of clicked element in PHP

I have a page with element <a> acting like a <button>, in this form the elements works like a service plans, and i want to get a value when one of these buttons has been clicked. Page1.php Page2.php I know that $_POST[‘name’] doesn’t works cuz don’t exist a input, but i don’t know how use something like this to get

php can not get array value from an array

I have an array: And I would like to get the first value in the array: I have tried each of the following: array_values($_array)[0]; $data[0]; array_keys($data)[0]; But none of them work, and I instead get an empty string. I need to get the first element or key of the array. Answer you can use array_key_first(your_array) Get the first key of

How do I validate with number and regex in vue js?

I have to validate textbox accepting only numeric value and number must start with 7 or 8 or 9 (regex). I have already done maxlength, minlength and required rule. Which are perfectly working fine. But I don’t know how to validate with only accepts number and regex. I have tried some of the syntaxes but not working. Answer The validation

Advertisement