Skip to content

JSON does not show id from DB

I returned the data from my firebase database in a JSON file with PHP CURL but it doesn’t show me the id of the records my code: <?php $url="https://******.firebaseio.com/a_info.json"; $…

How to round an integer UP to the nearest 15 in PHP

I have the INTEGER(255) variable $duration stored with a value taken from the user. I need to round this UP to the nearest 15. I have searched all over but haven’t been able to find a solution. How may I go about doing this? For example: 10 becomes 15 16 becomes 30 130 becomes 135 Also, how can I add

Array push and merge in php

How to merge one array with multple elements but the same index into on array with all index in PHP. I have one array look like this and i want to merge into one array. and my expected result i want like this Anyone can help in PHP please. Answer Since you want to change a multi-dimensional array to single

How do I change a database entry when I enter text into an input?

The logic is this: the text is displayed from the database, next to it there is a box to enter, after you enter text and click on the link ‘edit’ record in the database should change. I did it only if the text is static. Everything works. But I need to take text from input. How do I do that?