Skip to content
Advertisement

Default CodeIgniter controller not working or is it my htaccess?

I’m using CodeIgniter 3.1.13 and configured my htaccess file to remove “index.php” but when I try to go to a webpage it doesn’t work unless I put the default controller in the URL. Any advice? Going to the following URLs work fine… https://www.example.com https://www.example.com/index.php https://www.example.com/welcome https://www.example.com/welcome/page/test But the following URL does not work… https://www.example.com/page/test How do I get this URL

Array data manipulations PHP

I get from my DB data in format like this: Each of array inside has a key: “id”. It mostly look values from 1 to 3. I would like to create a new array based on this “ids” that would look like this: I`ve been trying to do it like this: And that would work, but it doesn`t look good

Uncaught Error: Call to a member function get_attributes() on null

Imports several thousand thumbnail images into existing products. For this purpose, I used the attribute that each product “featured-images” has, in which there is a link to the product. The code works fine and sets the thumbnails, but when I log into the admin system I get an error: Uncaught Error: Call to a member function get_attributes() on null. what’s

Echo specific value of a key of an array generated from an XML

I have the following code: That returns the following result: Now I want to echo the value of “CHANGEDATE”, but echo $array[“note”][“RESPONSE”][“CHANGE”][“TEST”][“CHANGEBY”]; returns nothing. Answer There’s no need to go to JSON, you can use your SimpleXML object directly: However, if you really want/need to, the root element note needs to be skipped: Demo: https://3v4l.org/fbTpB

Retrieve Data from POST Method and Display in HTML H1 Tag

Greetings, I am developing a website using WordPress and elementor. I have a form with the POST method on page1 which is redirecting the user to page2. How do I receive that data on page2 and display it in the H1 tag on the same page? Answer Data submitted from a form with the method=’post’ attribute can be accessed using

Advertisement