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…
Class ‘session’ not found (View: C:xampphtdocsLARAVELLARAVELresourcesviewswelcome.blade.php)
Here, I am trying to create a signup page using laravel. However, I’m having problems with the part of the code that has “session”. When I take that part out, the code works but when I leave it in, it doesn’t. The tutorial that I got the code from says that the sessions part of the cod…
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 …
Reorder chat tabs so tabs with newest received or sent messages are on top of list
I’m working on a simple messenger. This is how the Chat table looks like: This is how the User table looks like: This is how the PinnedUser table looks like: By using this query I can display …
Change value for object on foreach php
I have one array same this: $object = new stdClass(); $object->name = “test”; $object->age = “24”; $object1 = new stdClass(); $object1->name = “…
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…
how to display form errors under input field with php and javascript
I have a form. I want to submit the form without reloading the page. so I am using ajax to send data to PHP and then validating the inputs with PHP storing the errors in an array. How can I return error array to javascript and show errors in input fields. Any Suggestions? PHP Javascript Answer At first change…
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…
how to set value to specific object of array object in javasript
I have to write inputbox inner a looping statement. let say I have 3 times loop the question is, how to set every value I type in inputbox only settbthe result inner span from its row index only Answer You might have more luck trying an approach like this. Remove the ID attributes from the elements – yo…