Skip to content

Tag: php

Show form errors

I would like to show error messages in the top of my registration form. I created my registration form:

Register
{{ form_start(form) }} {{ …

Laravel query find comma separated and normal string

I got a column called fac that values can be a single number like 2 and also can be comma separated like 2,4,5 I want to get data from database via api. Also value can be a single or comma separated too. so user can search like these: localhost/api/search {fac: 1} Or localhost/api/search {fac: 1,4,5} I used f…

Get pathinfo from an open file handle

I’m reading data from a file and need to run checks on its extension I opened the file handle with fopen and given the handle to pathinfo() $handle2 = fopen(‘files/ppGM.txt’, ‘r’); $fileinfo = …

Add parameters in function

I have 2 functions which work together. But I can’t add parameters on the second one, I don’t understand how it works. 1st function if(!function_exists(‘pixiehuge_select_all’)) { function …