Skip to content

The correct way to path files/images/links on html

It seems to be a very beginner question, but after finish my whole website, i found a “bug” on the structure of the path files/images and links. Well, first let me tell you what is the exactly structure: The website are located on: /var/www Main pages files are located on the main website folder: …

ignoring img tags while searching for urls in string

I have the following code in which I am replacing urls with hyperlinked anchor tags, But I want to ignore all img tags while searching for urls, I have no idea how can I go for it. Answer As per @Biesor and @Nigel Ren I came up with this, For the time being I am using this till some better

How do i display the NESTED JSON data using php?

I coding a whole day just to display the nested Data from JSON that i got from the Api Provider but nothings gonna change. It’s always error! what should i do? Here’s my code hope you help me in this problem. Imagine my name of json file is 05-03-21.json. and here’s the JSON Data And here&#8…

How to Set my URL pattern in my php using get method parameters only

I have 3 php files in my directory(/account): index.php login.php signup.php Accessing the folder in my localhost: http:localhost/account ==> opens the default(index.php file) I want to access the login.php and signup.php using: and respectively. Here is my code in the index.php Please help to get me a way…

php traverses the array to get the corresponding value

I have two variables, number and user, which are not fixed. When I iterate through the array below, how do I determine if the number and user criteria are met to get the appropriate ID Example: If the value of amount is 100 and the value of user is 6, then the obtained ID is 1; If the value of

How to access to node fields in drupal 8

I’m having some issues, I’m loading some nodes and i want to get some values field, this is how is my field I’m loading my nodes like this: But i dont know how to get en fr and pt fields values Could you please help me? Regards Mario Answer You can load translation for each language then get…

How to merge static and dynamic forms together in php?

The my project has two forms. The first one is a static form that is used to collect user information (Form One inserts data into a table named, master). Second form is a dynamic form which collects additional information such as dependents (Form Two inserts data into a table named, dependents). formone.php c…