Hi I tried to make a log system panel to my website. The code is works fine because if you write the text into the input field it will show up. But if you reload the page it will disappear. So my problem is the disappearing text. I want to do this when I type the text so it doesn’t
Tag: php
Getting the values of a multidimensional array where key value is in another array
I have an array of courses: And a multidimensional array of completed courses that looks like this: I want to echo only the course, title and grade if it exists in the first array. I think I am needing a foreach loop, but I’m stuck. Answer You are on the right track in that you need to loop over your
Api-platform PUT operation with denormalization_context groups on an itemOperations not working
I have 2 entities: I wanted to retrieve only words for itemOperation and not for collectionOperations so i added a group GET “item_words.read” and for PUT denormalization_context. It is perfectly working for GET operation, for some reason the PUT operation is not giving me the “words” …
Check if str_replace Should Execute First to Avoid Duplicate Strings
Each time we save our ACF form, this snippet adds additional tags around the registered trademark symbol. Our goal is for it to do it just once, so we need to check for the tags first but don’t know how, as we’re quite new to PHP. Answer You should check first if string contains and if it does jus…
Get taxonomy name
I’m trying to modify a theme that has custom posts with custom taxonomies. At the bottom of the posts it displays a list of other posts (as in “you might also like…”) What I’m trying to do is to filter the posts that are displayed in that area so they match the category of the cu…
Hide element via css when another element is present on the page
I want to hide an element if one element is already present on the page. If element with the id: is present on the page, then hide following element: So I’ve found a solution how to do this via js. but I need to this via .css, if possible Answer Yes you can kind of do this. Here’s an example,
laravel dd return empty value
all… My problem here is when i want to return values with dd($datasave), return all other but, one is lost my code (first Controller) my Solicitudes.php(Model) and my view(not all only the part that is not returning… ) but when i want to see the returning values result: AppModelsSolicitudes {#1259…
PHP make subfile of a placeholder file?
I have the following structure for my site: ./u/ ./u/profile.php ./u/comics.php profile.php is filtered with the viewer’s username. For example, the account Venk would be ./u/Venk. I need comics.php to somehow be a subfolder of this but I’m not sure how to go about doing so. It should end up looki…
Hide element when another element is present on the page
I want to hide an element if one element is already present on the page. If element with the id: is present on the page, then hide following element: I want to achieve is either through a function or .css, it doesn’t matter. Answer Just do it with JavaScript.
Add and wrap product categories WordPress/Woocommerce in product loop
I use this snippet for display product categories in product loop on Shop and archives pages: I want this: To achieve this I use jQuery: How can I modify my PHP snippet to avoid using jQuery? Answer You could just append the corresponding tag before & after your foreach loop: Then you don’t need to …