Skip to content

Tag: php

PHP exceeding memory allocation in nested loops

I am parsing a string. If it meets a certain criteria, I want to append the new character to another substring until it stops meeting that criteria, and / or the end of the string. The code is basically as follows: The error that follows is: PHP message: PHP Fatal error: Allowed memory size of 805306368 bytes…

Insert CSS into html header via php Function

I have access to creating hooks to edit the appearance of websites, but no experience with php. The hooks manpage gives examples such as: Now, what I want to do is insert the following CSS into this function (the function is executed before rendering the page) so that instead of printing a message as above, i…

Cannot find php-curl package

I am struggling with the php-curl installation which cannot be found, I have seen plenty of topics related to it but it unfortunatelly did not help much. I want it for an curl function in a php …

PHP month before last

I have used date(‘F’, strtotime(‘last month’)) successfully to get the name of the previous month (currently December) but how to I get the month before last (currently November)? Looking at https://www.php.net/manual/en/datetime.formats.relative.php this doesn’t appear to be a b…