Skip to content

Regex: how to add a capture group?

I currently have this regex: [(?:w+*?s+)?([^][]+)] I want to add another capture group, so I can capture the text value before the groups. For example: Je naam (verplicht) [text* your-test] …

fetchAll only fetches one row from two joined tables

I have a join of two tables. Actually the code and the fetching worked fine before I inserted : and But now it only fetches the first row even though there are two: I used fetchAll and a foreach loop so I just don’t see why it is only fetching the first row. Maybe someone can help, thank you! Answer

Convert number to star rating php shortcode?

I’ve used the following code in order to generate a star rating inside a shortcode on my site. I’m new to PHP and incredibly confused. The issue I have is, how can I make $starNumber a variable number that I can change inside the shortcode? For example, if I wanted to show 3.5 stars with a shortco…

Php json_encode array and object array

I need to create a json with this format: { “reservs”: [ { “ResId”: “58”, “time”: “2020-05-15 19:41:50”, “boxEntering”: null, “boxClosing”: null, “active”: “1”, …