Skip to content

get date range from date of birth

I am creating a peers page for my website and I am trying to get a query that can fetch users from the users table which is structured as id, name, gender, dob. The query should fetch the users …

Getting zipcode from a string

I am trying to get zipcodes out of address strings. Zipcodes may look like this: 23-123 or 50-530. Strings usually look like this: Street 50, 50-123 City What I tried to do is finding the position of the zipcode and cut the next 6 characters starting from that point. Unfortunatelly strpos returns false all th…

WordPress loop with new. args for else

I would like to show posts in a custom post type with the category ‘pin-post-to-homepage’, then if that doesn’t exist then display posts from a different post type. Below are the arguments. Feel like …

php curl reponse not showing

php curl response not showing please help to fix. when I run this code I do not get any response from recharge.php file here is recharge.php file Answer try this code, hope it will help you— your current file — recharge.php and also you should put return/die/exit after echo statement to avoid the …

Symfony 5 queryBuilder count data

in one of my queries I am joining three tables to allow me to filter by taking into account these three tables. The problem is when I do a counter of the data from the main table (CV table), like I join the language table (ManyToMany), the categories table and the diploma table (manyToMany), when I do a count…

PHP – how to pass my variable in my function

Someone can help me with that… How to pass a variable ($membreConf) in that: Presently, is not working 🙁 Answer In this case, the use statement is missing. See example #3 of https://www.php.net/manual/en/functions.anonymous.php

PHP find the charset set by setlocale

All my websites use UTF-8 as charset. But there are some issues when setting setlocale and getting localized strings from strftime for month names and weekday names. issue: Localizing month names do not work on the server. issue: How to know if the locale stings are in UTF-8 or ISO? Concrete: I set the locale…