Skip to content

PHP Generate day range

I am trying to generate the range of days, from 1 to 28, with the English ordinal suffix for the day of the month. For example: 1st of month, 2nd of month… for($i = 1; $i

Unknown column ‘stockout_details.purchi’ in ‘on clause’

i’m using this query but i found this error Unknown column ‘stockout_details.purchi’ in ‘on clause’ Answer You need to include the column in the subquery: Note that I replaced the table aliases with more manageable aliases and qualified all column names. That said, I’d be s…

How to make one variable to multiple variables using php?

How to assign one variable to multiple variables using php? Example: I want to get “Peter” and “Mary” string on the $student. how to make the $student become two variable?? I hope the I can get the final result is Is it using str_contains or str_replace????? Thank you very much Answer …

How to work json string on foreach loop in php

I’m trying to make a foreach loop from string value which comes from a JSON value like: I want to make a foreach loop and echo URL under the loop I have tried using this but it returns PHP Warning: Invalid argument supplied for foreach() Answer Your input is a string, so we need transform it to array fo…

Call to a member function lastPage() on int using laravel 6

i am starting to create an ads site, i display 36 products images in a blade index with success ,but when i try add pagination i get this error Call to a member function lastPage() on int . AnnoncesController.php landing-page.blade.php Answer You are calling $paginator->lastPage(); and $paginator is an int…