Posts by GustavoCave • 545 points
19 posts
-
1
votes1
answer99
viewsQ: Show only 1 category on page
Need to create 2 functions, each will show a category (commercial and residential) <?php class MP_Emmet_Plugin_Portfolio { public function __construct() { add_action(…
-
-1
votes1
answer229
viewsQ: Extract json information in php
Guys I have the following code: <?php $key = "*****************"; $forcast_days='5'; $city = '-30.1087957,-51.3169879'; $url…
-
0
votes0
answers70
viewsQ: Text encoding (accentuation error)
The php code: case 'countries': $array = array ( 'city1 ' => __('Acrelândia - AC',"ultimatemember") Inside the wordpress plugin to choose the option created in php Viewing the chosen option. I…
phpasked GustavoCave 545 -
1
votes1
answer632
viewsQ: How to leave the image in front of the text?
The image below shows that when placing the mouse over the image, it gets larger with a SCALE via CSS (transform: scale(3.05)). But the content of the site below is on the image, would anyone know…
cssasked GustavoCave 545 -
0
votes1
answer387
viewsQ: View from largest to smallest (php + json)
Staff created a foreach to read a JSON result: foreach($results['results']['collection1'] as $collection) { echo $collection['nome'] . "<br />"; echo $collection['cat'] . "<br />"; echo…
phpasked GustavoCave 545 -
1
votes1
answer318
viewsQ: Using Else inside the foreach
Guys I have the following code: <?php $string = $_POST['search']; foreach($results['results']['collection1'] as $collection) { if(stristr($collection['prod']['text'],$string) !== false) { echo…
-
3
votes1
answer674
viewsQ: Transform JSON result to 'uppercase'
I have the following JSON (complete): { "name": "Romano Pesca", "count": 8, "frequency": "Weekly", "version": 5, "newdata": false, "lastrunstatus": "success", "thisversionstatus": "success",…
-
3
votes1
answer606
viewsQ: Find a word in a JSON result
Guys I got the following json: "results": { "collection1": [ { "prod": { "text": "COLCHÃO NAUTIKA KING SIZE" I have a search form: <form id="search" method="POST"> <input type="text"…
-
1
votes2
answers381
viewsQ: Reading JSON result with PHP
I have the following result in JSON and need to treat it with PHP. JSON: { "name": "abc", "count": 6, "frequency": "Manual Crawl", "version": 3, "newdata": true, "lastrunstatus": "success",…
-
0
votes3
answers688
viewsA: Hide JSON element using javascript
Guys, I got it using the following: function transform(data) { data.results.collection1.map(function(item) { delete item.index; return item; }); return data; };…
-
1
votes3
answers688
viewsQ: Hide JSON element using javascript
I have the following result in JSON: { "name": "test", "count": 5, "frequency": "Manual Crawl", "version": 1, "newdata": true, "lastrunstatus": "success", "thisversionstatus": "success",…
-
0
votes2
answers51
viewsA: Remove filter for pages only
Here’s what I did, and it worked: function my_content($content) { if(is_single() || !is_page_template('template_fullwidth.php') $content .= "Buyer’s name: " . usp_get_meta(false, 'usp-Author') . "";…
-
2
votes2
answers51
viewsQ: Remove filter for pages only
I needed to create a filter to print the name and email of users within posts (the_content) that they create. The problem is that it is showing in the posts and also in the pages, I wanted to show…
-
0
votes2
answers1280
viewsQ: Treating XML file with PHP
I have the following XML: <offer categoryId="3588" id="154394195459775522"> <offerName> CAMISETA DROP DEAD PRODUCTION – MASCULINA VERDE ESCURO </offerName> <links> <link…
-
2
votes2
answers3257
viewsQ: Login with PHP + MYSQL +MD5
I created a login form with the following code: Login.html: <form action="login.php" method="post"> <input type="hidden" name="id" value=''> Usuário<input type="text" name="usuario"…
-
2
votes2
answers1540
viewsQ: How to show date and time in php
How do I show the date and time after the user sends a message? I created in the database a column called 'date' of type 'DATETIME'. In php I used the following code to insert the data: Inserir.php…
phpasked GustavoCave 545 -
2
votes2
answers19537
viewsQ: Delete record by ID
I created a button to delete a record in the database with the following code: Filing cabinet form.php: <form action='deletar.php' method='post'> <input type='submit' name='deletar'…
-
15
votes5
answers41336
viewsQ: Number formatting (PHP)
I created a function cotacaoDolar(); who returns at the end: return str_replace(",",".",$texto_dolar); And the result, appears here: echo $i['sellingStatus'][0]['currentPrice'][0]['__value__'] *…
phpasked GustavoCave 545 -
5
votes3
answers982
viewsQ: Operation in PHP. Multiplication using percentage
<?php echo $i['sellingStatus'][0]['currentPrice'][0]['__value__']; ?> How can I multipuple '__value__' by 2 and then add 60% to the total amount? Example: Valor = 10 Multiplica por 2 = 20…
phpasked GustavoCave 545