Skip to content

Tag: explode

How to get word after user input in textarea?

I have a text area to user to insert text, but if the user type {{name}}, {{nickname}} and {{email}}. It must show the message with that value. Let me demonstrate: For example: If user type: Hello, {{name}} has {{nickname}} and {{email}} the message must be like this: Hello, user A has nickname A and email@gm…

how to use explode for an array of objects

I have an array like that: I want to do a foreach in “prerequis”: I need in second foreach to use in $value2[‘champ’] where $value2[‘champ’] is “tranche.fus.fup_id. So I need to explode that to have [‘tranche’][‘fus’][‘fup_id’]. How…

Show checkbox checked in the table

I have a problem showing the selected check value in the table. Now I cannot follow my selected value to show the check values in each row in the table. For example below coding,I have the selected values following are true,false,true,false,true,false, I need to show these values in the checkbox, so I make th…

How to pass the explode value in another foreach in PHP

I am getting all the data from the database and one of my column data is 1|3|6|8. I am using explode to get the output. Now, I have a checkbox list that I am getting from the database and I have to pass the explode value in the checkbox list to check the checkbox. I know I have to use

PHP separate values by comma

I am trying to separate my JSON Array: WHERE What i need is if one column like “Front_glass”:”X, XXX_or_XX, G” has three values it should be or any thing that is possible Thanks. Answer You can use array_map function in your case. Look here live PHP sandbox