Skip to content

ManyToMany relationship get the data

i am try to buid a ManyToMany relationship i have 3 Models movie,genres & moviegenres i want to get all genres for a movie for example $movie = Movie::find(); $movie->genres; i can put the …

Average Calculation for PHP with variable issue

Morning Everyone, I am trying to troubleshoot this code. I have made progress, but I am doing a simple average calculation. When I try and declare a variable before using it I have issues. When I try …

One page to handle different URL with parameters

The solution is probably very simple, but still, I am struggling to understand how to make it work. We are preparing for the new school year, and of course, we’re required to make things work remotely. We will have a bunch of educational videos posted on Youtube, and an external Windows app will make su…

print_r not allowing me to escape []

How can I escape the []? If I execute the following code, it just throws me an error Answer The name is just Name and you should use implode to join the pieces back together. This assumes your parameter is always Name[].