Skip to content
Advertisement

Tag: string

DQL with between – string date – PHP

I am trying to do a sql with between. The date data is entered first as a string. Any help with this question? Answer The string is dd/mm/yyyy At the final you will get date like 2021-09-28 and now we can do a between with actual date 2021-10-01 after this you can see the sentence in DB with dd($query->getSQL()); function

concatenate array values ​into string?

I have this array, is stored in a variable called $ data : and i want to add to another variable to send to an API but when i echo $body the result its like this: how can I add the string to have an output like this: thanks to all Answer If you’re using XML, it’s better to learn

Remove duplicated words between two and more string texts in PHP

Words: In this words i want to remove “My Subject”, the end of the day words should replaced like: My subject can be dynamically change it can be three word or four word. Is it possible to remove first duplicated words from string? Thank you. Answer You could find the duplicate words by splitting it by space and convert into

Sending a JSON string to HTML that is too large

I’m using Codeigniter4, and I generate a rather long JSON so that I can make map points with it. However, when I pass along the string with And attempted to unpack the string on the html side with I get a syntax error because the entire json string was not sent. I have tested my setup with a smaller amount

Using PHP preg_replace() with a string variable, where the variable needs to represent multiple permutations of itself

Using: I’d like to replace, case-insensitively, the text contained in $My_String, which I can achieve with: If $My_String is alpha beta gamma delta, this will identify: alPhA beTa GammA DeLta aLpHa bEta gAMma delTa etc. So far, so good. But any spaces and hyphens in $My_String must also be regarded as equivalent. So the preg_replace() function also needs to identify

How to add elements to a string from $row? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last year. Improve this question How I can get this query to create another string from the outputted rows? You see, ‘$convert’ contains 2 values from my limits table which are

Advertisement