Skip to content

Tag: php

preg_match include string with unlimit occurence

I trying to create preg_match function with a pattern to validate the future string with unlimit occurence. This is my function like this: One occurrence must respect the following format any charchters between two parentheses: (mystring123/). The whole of string ($arg) is a collection of these occurrences. F…

Creating a function to logout a WordPress user?

I’m trying to create a function to logout WordPress users after a period of inactivity. The timed element is working as it should and redirecting users after a set period of time. The problem is that once the PHP script is loaded (in code sample), I run into the following error: Fatal error: Call to und…