<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Dudas de Programación - Preguntas y respuestas recientes en PHP</title>
<link>https://dudasprogramacion.com/qa/php</link>
<description>Powered by Question2Answer</description>
<item>
<title>Respondido: El valor de file_get_contents siempre me devuelve false</title>
<link>https://dudasprogramacion.com/2700/el-valor-de-filegetcontents-siempre-me-devuelve-false?show=2832#a2832</link>
<description>&lt;p&gt;Hola @kaisherk,&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; Se me ocurre que los espacios en blanco dentro de $secret pueden ser un problema.&lt;/p&gt;&lt;p&gt;&amp;nbsp; Intenta armar la url de esta forma:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;&lt;span style=&quot;color:#34495e&quot;&gt;$url = urlencode(&quot;&lt;/span&gt;&lt;a href=&quot;https://www.google.com/recaptcha/api/siteverify?secret=$secret&amp;amp;response=$response&amp;amp;remoteip=$ip%22;&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot; style=&quot;box-sizing: border-box; color: rgb(41, 128, 185); text-decoration-line: none; font-family: Ubuntu, Helvetica, Arial, FreeSans, sans-serif;&quot;&gt;https://www.google.com/recaptcha/api/siteverify?secret=$secret&amp;amp;response=$response&amp;amp;remoteip=$ip&quot;);&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Saludos,&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2700/el-valor-de-filegetcontents-siempre-me-devuelve-false?show=2832#a2832</guid>
<pubDate>Fri, 04 Feb 2022 09:37:48 +0000</pubDate>
</item>
<item>
<title>me han pedido que haga estos ejercicios pero llevo días sin saber como, ayuda....</title>
<link>https://dudasprogramacion.com/2814/pedido-haga-estos-ejercicios-pero-llevo-dias-saber-como-ayuda</link>
<description>&lt;p&gt;&lt;/p&gt;&lt;p&gt;1. - &lt;strong&gt;&amp;nbsp;&lt;/strong&gt;Escribir un programa en PhP que sume los números pares comprendidos entre 1 y 100 y los impares y mostrar el resultado del mismo.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.- &lt;strong&gt;&amp;nbsp;&lt;/strong&gt;Usando bucle for&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b.- Usando bucle Do&amp;nbsp; …. While&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.- Usando bucle While&lt;/p&gt;&lt;p&gt;&amp;nbsp;2.- Mostrar la tabla de multiplicar del 2. Emplear el for, luego el while y por último el do/while&lt;/p&gt;&lt;p&gt;3.- Programa que lee dos números y nos dice cuál es el mayor, o si son iguales.&lt;/p&gt;&lt;p&gt;4.- En un determinado comercio se realiza un descuento dependiendo del precio de cada producto. Si el precio es inferior a 1000 € no se hace descuento, si es mayor o igual a 1000€ y menor a 10000€ se hace un 5 % de descuento, y si es mayor o igual a 10000€ se hace un 10% de descuento. Se pide codificar en PhP el&amp;nbsp; programa que debe leer desde teclado el precio del producto y calcula y visualiza el precio final.&lt;/p&gt;&lt;p&gt;5.- Programa que lee de forma aleatoria 5 números de forma aleatoria comprendidos entre&lt;/p&gt;&lt;p&gt;-10 y 10 &lt;span style=&quot;font-family:Wingdings&quot;&gt;à&lt;/span&gt; rand(-10,10) ,&amp;nbsp;&amp;nbsp; e visualizar cuántos&amp;nbsp; hay positivos, negativos y cero y la suma total de los números enteros positivos leídos.&lt;/p&gt;&lt;p&gt;6.- Programa que lee un número entero positivo y calcula y visualiza su factorial.&lt;/p&gt;&lt;p&gt;0! = 1,&amp;nbsp; 1!= 1, 2! = 2 * 1, 3! = 3* 2* 1, 4!= 4*3*2*1,…. N! = N*(N-1)*(N-2)*……3*2*1.&lt;/p&gt;&lt;p&gt;7. &lt;strong&gt;(ejercicio examen 2021) &lt;/strong&gt;Realizar un programa en PhP pida desde teclado &lt;strong&gt;cúantos&lt;/strong&gt; números quiere generar comprendidos entre 0 y 50 de forma aleatoria.&lt;/p&gt;&lt;p&gt;Se pide:&lt;/p&gt;&lt;p&gt;7.1.-&amp;nbsp; Cuántos números se han generado comprendidos entre 0 y 10. En este caso, de cada número visualizará su calificación según la siguiente especificación:&lt;/p&gt;&lt;p&gt;(0 – 1) &lt;span style=&quot;font-family:Wingdings&quot;&gt;à&lt;/span&gt; Muy Deficiente,&amp;nbsp; (2 – 4) &lt;span style=&quot;font-family:Wingdings&quot;&gt;à&lt;/span&gt; Insuficiente,&amp;nbsp; (5) &lt;span style=&quot;font-family:Wingdings&quot;&gt;à&lt;/span&gt; Suficiente, (6) &lt;span style=&quot;font-family:Wingdings&quot;&gt;à&lt;/span&gt; Bien,&lt;/p&gt;&lt;p&gt;&amp;nbsp;(7 – 8) &lt;span style=&quot;font-family:Wingdings&quot;&gt;à&lt;/span&gt; Notable , (9-10) &lt;span style=&quot;font-family:Wingdings&quot;&gt;à&lt;/span&gt; Sobresaliente&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;7.2.-&amp;nbsp; Visulizar cuántos son múltiplos de 3 y de 7.&lt;/p&gt;&lt;p&gt;8. &lt;strong&gt;(ejercicio examen 2021) &lt;/strong&gt;Esc&lt;span style=&quot;background-color:white&quot;&gt;ribir un programa que simule una calculadora básica, ésta puede realizar la operación de suma, resta, multiplicación y división.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align:center&quot;&gt;&amp;lt;!--[if gte vml 1]&amp;gt; &amp;lt;![endif]--&amp;gt;&amp;lt;!--[if !vml]--&amp;gt;&lt;img alt=&quot;image&quot; src=&quot;file:///C:/Users/helba/AppData/Local/Temp/msohtmlclip1/01/clip_image002.jpg&quot; style=&quot;height:183px; width:330px&quot;&gt;&amp;lt;!--[endif]--&amp;gt;&lt;/p&gt;&lt;p&gt;Tener en cuenta que&amp;nbsp; en la división, si el divisor es 0, deberá visualizar al usuario ‘&lt;strong&gt;infinito’&lt;/strong&gt; y no generar un error. En los restantes casos (suma, resta…) deberá visualizar la operación correspondiente, por ejemplo, si el Dividendo es 8 y divisor e 2, al clikar en restar se visualizará: &lt;strong&gt;La resta de 8 menos 2 es 6 .&lt;/strong&gt;Si es Multiplicar &lt;span style=&quot;font-family:Wingdings&quot;&gt;à&lt;/span&gt;&lt;strong&gt;la multiplicación de 8 por 2 es 16&lt;/strong&gt; y así con cada uno de ellos.&lt;/p&gt;&lt;p&gt;9.- &lt;strong&gt;&amp;nbsp;&lt;/strong&gt;Realizar un programa en PhP que lea desde teclado:&lt;/p&gt;&lt;p style=&quot;text-align:center&quot;&gt;&amp;lt;!--[if gte vml 1]&amp;gt; &amp;lt;![endif]--&amp;gt;&amp;lt;!--[if !vml]--&amp;gt;&lt;img alt=&quot;image&quot; src=&quot;file:///C:/Users/helba/AppData/Local/Temp/msohtmlclip1/01/clip_image004.jpg&quot; style=&quot;height:215px; width:389px&quot;&gt;&amp;lt;!--[endif]--&amp;gt;&lt;/p&gt;&lt;p&gt;Se pide:&amp;nbsp;&lt;/p&gt;&lt;p&gt;1.- Calcular un nuevo salario según lo siguiente:&lt;/p&gt;&lt;p&gt;&amp;lt;!--[if !supportLists]--&amp;gt;a.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--[endif]--&amp;gt;Si el salario es&amp;nbsp; &amp;gt;2000 € no cambiará.&lt;/p&gt;&lt;p&gt;&amp;lt;!--[if !supportLists]--&amp;gt;b.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--[endif]--&amp;gt;Si el salario se encuentra entre&amp;gt;= 1000€ y &amp;lt;=2000€.&lt;/p&gt;&lt;p&gt;&amp;lt;!--[if !supportLists]--&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--[endif]--&amp;gt;Si edad &amp;gt;45 se sube un 3% al salario.&lt;/p&gt;&lt;p&gt;&amp;lt;!--[if !supportLists]--&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ii.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--[endif]--&amp;gt;Si edad &amp;lt;=45 se sube un 10% al salario.&lt;/p&gt;&lt;p&gt;&amp;lt;!--[if !supportLists]--&amp;gt;c.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--[endif]--&amp;gt;Si el salario es&amp;nbsp; &amp;lt;1000€.&lt;/p&gt;&lt;p&gt;&amp;lt;!--[if !supportLists]--&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--[endif]--&amp;gt;Los menores de 30 años cobrarán a partir de ahora 1100€.&lt;/p&gt;&lt;p&gt;&amp;lt;!--[if !supportLists]--&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ii.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--[endif]--&amp;gt;Los &amp;gt;=30 y &amp;lt;=45 años se le sube un 3%.&lt;/p&gt;&lt;p&gt;&amp;lt;!--[if !supportLists]--&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iii.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--[endif]--&amp;gt;A los &amp;gt;45 años se les sube un 15%.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;En el caso de que no se inserte algún dato en el formulario, sacar un mensaje de error diciendo &lt;strong&gt;“FALTAN DATOS”&lt;/strong&gt; y un enlace que nos lleve de nuevo al principio.&lt;/p&gt;&lt;p&gt;10.&amp;nbsp; (&lt;strong&gt;ejercicio examen 2021) &lt;/strong&gt;Supongamos el siguiente código:&lt;/p&gt;&lt;p&gt;&amp;lt;?php&lt;/p&gt;&lt;p&gt;$x = 1;&lt;/p&gt;&lt;p&gt;$s = 0;&lt;/p&gt;&lt;p&gt;while ($x &amp;lt; 3) {&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $y = 1;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while ($y &amp;lt; 5) {&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $s += $x + $y;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $y += 1;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $x += 1;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;print &quot;el valor de s es $s&quot;;&lt;/p&gt;&lt;p&gt;¿&amp;gt;&lt;/p&gt;&lt;p&gt;a.- Ejecutar el programa a mano, ¿Qué valor de $s se visualiza?&lt;/p&gt;&lt;p&gt;b.- Cuántas veces se ejecuta $s += $x + $y&amp;nbsp; .&lt;/p&gt;&lt;p&gt;c.- Qué modificaciones le haría a ese fragmento de código para contar el número de veces que se ejecuta la sentencia anterior?&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;while ($y &amp;lt; 5) {&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $s += $x + $y;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $y += 1;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2814/pedido-haga-estos-ejercicios-pero-llevo-dias-saber-como-ayuda</guid>
<pubDate>Tue, 23 Nov 2021 08:34:32 +0000</pubDate>
</item>
<item>
<title>&quot;2&quot;=&gt; str_replace(&quot;.&quot;, &quot;.&lt;br&gt;&quot;, $reg-&gt;descripcion);  me manda error que me hace fala o en que estoy mal</title>
<link>https://dudasprogramacion.com/2812/strreplace-reg-descripcion-manda-error-que-hace-fala-estoy</link>
<description>&lt;p&gt;&lt;span style=&quot;color:#9cdcfe&quot;&gt;$rspta&lt;/span&gt;= &lt;span style=&quot;color:#dcdcaa&quot;&gt;mysqli_query&lt;/span&gt;(&lt;span style=&quot;color:#9cdcfe&quot;&gt;$conexion&lt;/span&gt;, &lt;span style=&quot;color:#ce9178&quot;&gt;&quot;select ID, nombre, descripcion from sistema&quot;&lt;/span&gt;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color:#9cdcfe&quot;&gt;$data&lt;/span&gt;=&lt;span style=&quot;color:#dcdcaa&quot;&gt;array&lt;/span&gt;();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color:#c586c0&quot;&gt;while&lt;/span&gt;(&lt;span style=&quot;color:#9cdcfe&quot;&gt;$reg&lt;/span&gt;=&lt;span style=&quot;color:#9cdcfe&quot;&gt;$rspta&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color:#dcdcaa&quot;&gt;fetch_object&lt;/span&gt;()){&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color:#9cdcfe&quot;&gt;$data&lt;/span&gt;[]=&lt;span style=&quot;color:#dcdcaa&quot;&gt;array&lt;/span&gt;(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color:#ce9178&quot;&gt;&quot;0&quot;&lt;/span&gt;=&amp;gt;&lt;span style=&quot;color:#ce9178&quot;&gt;&#039;&amp;lt;button class=&quot;btn btn-sm btn-warning&quot; onclick=&quot;mostrarRegistro(&#039;&lt;/span&gt;.&lt;span style=&quot;color:#9cdcfe&quot;&gt;$reg&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color:#9cdcfe&quot;&gt;ID&lt;/span&gt;.&lt;span style=&quot;color:#ce9178&quot;&gt;&#039;)&quot;&amp;gt;Modificar&amp;lt;/button&amp;gt;&amp;lt;br&amp;gt;&#039;&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color:#ce9178&quot;&gt;&#039; &amp;lt;button class=&quot;btn btn-sm btn-danger&quot; onclick=&quot;desactivar(&#039;&lt;/span&gt;.&lt;span style=&quot;color:#9cdcfe&quot;&gt;$reg&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color:#9cdcfe&quot;&gt;ID&lt;/span&gt;.&lt;span style=&quot;color:#ce9178&quot;&gt;&#039;)&quot;&amp;gt;Eliminar&amp;lt;/i&amp;gt;&amp;lt;/button&amp;gt;&#039;&lt;/span&gt;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color:#ce9178&quot;&gt;&quot;1&quot;&lt;/span&gt;=&amp;gt;&lt;span style=&quot;color:#9cdcfe&quot;&gt;$reg&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color:#9cdcfe&quot;&gt;nombre&lt;/span&gt;,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color:#ce9178&quot;&gt;&quot;2&quot;&lt;/span&gt;=&amp;gt; &lt;span style=&quot;color:#dcdcaa&quot;&gt;str_replace&lt;/span&gt;(&lt;span style=&quot;color:#ce9178&quot;&gt;&quot;.&quot;&lt;/span&gt;, &lt;span style=&quot;color:#ce9178&quot;&gt;&quot;.&amp;lt;br&amp;gt;&quot;&lt;/span&gt;, &lt;span style=&quot;color:#9cdcfe&quot;&gt;$reg&lt;/span&gt;-&amp;gt;&lt;span style=&quot;color:#9cdcfe&quot;&gt;descripcion&lt;/span&gt;);&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color:#9cdcfe&quot;&gt;$results&lt;/span&gt;=&lt;span style=&quot;color:#dcdcaa&quot;&gt;array&lt;/span&gt;(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color:#ce9178&quot;&gt;&quot;sEcho&quot;&lt;/span&gt;=&amp;gt;&lt;span style=&quot;color:#b5cea8&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;color:#6a9955&quot;&gt;//informacion para el datables&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color:#ce9178&quot;&gt;&quot;iTotalRecords&quot;&lt;/span&gt;=&amp;gt;&lt;span style=&quot;color:#dcdcaa&quot;&gt;count&lt;/span&gt;(&lt;span style=&quot;color:#9cdcfe&quot;&gt;$data&lt;/span&gt;),&lt;span style=&quot;color:#6a9955&quot;&gt;//enviamos el total registros al datatable&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color:#ce9178&quot;&gt;&quot;iTotalDisplayRecords&quot;&lt;/span&gt;=&amp;gt;&lt;span style=&quot;color:#dcdcaa&quot;&gt;count&lt;/span&gt;(&lt;span style=&quot;color:#9cdcfe&quot;&gt;$data&lt;/span&gt;),&lt;span style=&quot;color:#6a9955&quot;&gt;//enviamos total de registros a visualizar&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color:#ce9178&quot;&gt;&quot;aaData&quot;&lt;/span&gt;=&amp;gt;&lt;span style=&quot;color:#9cdcfe&quot;&gt;$data&lt;/span&gt;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color:#dcdcaa&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color:#dcdcaa&quot;&gt;json_encode&lt;/span&gt;(&lt;span style=&quot;color:#9cdcfe&quot;&gt;$results&lt;/span&gt;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color:#c586c0&quot;&gt;break&lt;/span&gt;;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2812/strreplace-reg-descripcion-manda-error-que-hace-fala-estoy</guid>
<pubDate>Thu, 18 Nov 2021 23:49:40 +0000</pubDate>
</item>
<item>
<title>Respondido: Por que no me compila el codigo?</title>
<link>https://dudasprogramacion.com/2782/por-que-no-me-compila-el-codigo?show=2787#a2787</link>
<description>&lt;p&gt;Hola @Raiford!&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; Imagino que cuando dices&amp;nbsp;&lt;em&gt;no me compila&lt;/em&gt;&amp;nbsp;te refieres a que no genera el resultado que buscas (PHP no se compila, se interpreta).&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; En todo caso, ¿estás viendo algún mensaje de error en particular o qué es exactamente lo que estás observando? &lt;a rel=&quot;nofollow&quot; href=&quot;https://academy.leewayweb.com/php-me-da-error-y-ahora/&quot;&gt;Este artículo&lt;/a&gt; te puede ayudar a encontrar tu problema.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; Saludos!&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2782/por-que-no-me-compila-el-codigo?show=2787#a2787</guid>
<pubDate>Wed, 20 Oct 2021 14:29:54 +0000</pubDate>
</item>
<item>
<title>No me aparece las otras php creadas después de la primera . Necesito un código para unirlas? Cual es el código ?</title>
<link>https://dudasprogramacion.com/2760/aparece-creadas-despues-primera-necesito-codigo-unirlas-codigo</link>
<description></description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2760/aparece-creadas-despues-primera-necesito-codigo-unirlas-codigo</guid>
<pubDate>Tue, 13 Jul 2021 20:43:12 +0000</pubDate>
</item>
<item>
<title>Respondido: Comparativa php</title>
<link>https://dudasprogramacion.com/2730/comparativa-php?show=2743#a2743</link>
<description>&lt;p&gt;Tu comparación esta mal&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#34495e; font-family:Ubuntu,Helvetica,Arial,FreeSans,sans-serif&quot;&gt;if(($numero == $num) and ($pagado == &quot;si&quot; )) {&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box; color: rgb(52, 73, 94); font-family: Ubuntu, Helvetica, Arial, FreeSans, sans-serif;&quot;&gt;&lt;br style=&quot;box-sizing: border-box; color: rgb(52, 73, 94); font-family: Ubuntu, Helvetica, Arial, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;color:#34495e; font-family:Ubuntu,Helvetica,Arial,FreeSans,sans-serif&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo &quot;$nombre&quot;;&lt;/span&gt;&lt;br style=&quot;box-sizing: border-box; color: rgb(52, 73, 94); font-family: Ubuntu, Helvetica, Arial, FreeSans, sans-serif;&quot;&gt;&lt;br style=&quot;box-sizing: border-box; color: rgb(52, 73, 94); font-family: Ubuntu, Helvetica, Arial, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;color:#34495e; font-family:Ubuntu,Helvetica,Arial,FreeSans,sans-serif&quot;&gt;} elseif(($numeroUno == $num) and ($pagadoUno == &quot;no&quot; ))&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color:#34495e; font-family:Ubuntu,Helvetica,Arial,FreeSans,sans-serif&quot;&gt;el else if debe de coencidir con la primera comparacion; en este caso no tiene nada que ver con lo anterior, para esto lo que estas haciendo deben de ser if separados&lt;/span&gt;&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2730/comparativa-php?show=2743#a2743</guid>
<pubDate>Thu, 29 Apr 2021 19:18:26 +0000</pubDate>
</item>
<item>
<title>Respondido: Radio varias opciones php - html</title>
<link>https://dudasprogramacion.com/2726/radio-varias-opciones-php-html?show=2728#a2728</link>
<description>&lt;p&gt;Hola Jesus:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; Con radio buttons no podrás hacerlo, precisamente un radio button se utiliza para garantizar que se seleccione &lt;strong&gt;una &lt;/strong&gt;de muchas opciones.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; En todo caso, intenta cambiar por checkboxes.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; Saludos!&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2726/radio-varias-opciones-php-html?show=2728#a2728</guid>
<pubDate>Sun, 28 Mar 2021 14:59:48 +0000</pubDate>
</item>
<item>
<title>Respondido: table php for</title>
<link>https://dudasprogramacion.com/2721/table-php-for?show=2722#a2722</link>
<description>&lt;p&gt;Prueba con algo como:&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;&amp;lt;table&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;$num = 0;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;for ( $i = 0; $i &amp;lt; 3; $i++ ) {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;?&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;?php&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;&amp;nbsp; &amp;nbsp;for ( $j = 0; $j &amp;lt; 10; $j++ ) {&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;?&amp;gt;&amp;lt;td&amp;gt;&amp;lt;?php echo $num; ?&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;$num++;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;?&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;?php&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;?&amp;gt;&amp;lt;/table&amp;gt;&lt;/span&gt;&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2721/table-php-for?show=2722#a2722</guid>
<pubDate>Wed, 24 Mar 2021 13:47:48 +0000</pubDate>
</item>
<item>
<title>Respondido: Usar variable NO ESTÁTICA en MÉTODO ESTÁTICO</title>
<link>https://dudasprogramacion.com/2718/usar-variable-no-estatica-en-metodo-estatico?show=2719#a2719</link>
<description>&lt;p&gt;Hola Isma:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; Me parece que tienes un problema conceptual. Los métodos estáticos no actúan sobre ningún objeto en particular, por lo tanto, no es posible acceder a una variable privada (salvo que sea estática también).&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; En tu ejemplo, la variable $valor_final sería local del método estático descuento.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; Deberías pensar los métodos estáticos como&amp;nbsp;métodos&amp;nbsp;&lt;em&gt;de clase&lt;/em&gt;&amp;nbsp;y los no estáticos como&amp;nbsp;&lt;em&gt;de instancia&lt;/em&gt;.&lt;/p&gt;&lt;p&gt;&amp;nbsp; Consultame si te quedan dudas ;)&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2718/usar-variable-no-estatica-en-metodo-estatico?show=2719#a2719</guid>
<pubDate>Thu, 18 Mar 2021 13:32:05 +0000</pubDate>
</item>
<item>
<title>como puedo declarar una variable</title>
<link>https://dudasprogramacion.com/2716/como-puedo-declarar-una-variable</link>
<description>Cree una variable llamada apellido y establezca el suyo Cree una variable edad y establezca como valor su edad en años Imprima todas las variables en una misma línea y confirme cambios en GIT</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2716/como-puedo-declarar-una-variable</guid>
<pubDate>Mon, 15 Mar 2021 03:21:57 +0000</pubDate>
</item>
<item>
<title>saber el numero del registro actual de una consulta mysql php</title>
<link>https://dudasprogramacion.com/2699/saber-el-numero-del-registro-actual-de-una-consulta-mysql-php</link>
<description>Lo que necesito es primero contar todos los registros de la tabla.&lt;br /&gt;
&lt;br /&gt;
Segundo traer unicamente en pantalla el valor que estoy buscando de acuerdo al numero de cedula.&lt;br /&gt;
&lt;br /&gt;
Tercero saber cual es el numero de registro que le corresponde al valor buscado.&lt;br /&gt;
&lt;br /&gt;
Ejemplo:&lt;br /&gt;
&lt;br /&gt;
Voy a buscar mi cedula en la tabla empleados C.C. 123456&lt;br /&gt;
&lt;br /&gt;
debe contar hay 250 empleados&lt;br /&gt;
&lt;br /&gt;
ese numero de cedula esta la fila 123&lt;br /&gt;
&lt;br /&gt;
Nota: no cabe la posibilidad alguna de numerar la tabla en un campo codigo que valla del 1 al 250 y cuando yo haga la consulta traer el valor de ese campo.</description>
<category>Codeigniter</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2699/saber-el-numero-del-registro-actual-de-una-consulta-mysql-php</guid>
<pubDate>Sun, 17 Jan 2021 07:21:33 +0000</pubDate>
</item>
<item>
<title>Respondido: Como encriptar codigo fuente</title>
<link>https://dudasprogramacion.com/2649/como-encriptar-codigo-fuente?show=2694#a2694</link>
<description>Aquí encontré algunas opciones:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/pk-fr/yakpro-po&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/pk-fr/yakpro-po&lt;/a&gt; (Bastante actualizada)&lt;br /&gt;
&lt;br /&gt;
Y estas dos que parecen abandonadas pero pueden servir:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/Eccenux/POBS&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/Eccenux/POBS&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/Xeoncross/PHP-Compactor&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;https://github.com/Xeoncross/PHP-Compactor&lt;/a&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2649/como-encriptar-codigo-fuente?show=2694#a2694</guid>
<pubDate>Thu, 14 Jan 2021 12:46:13 +0000</pubDate>
</item>
<item>
<title>Respondido: PRoblema con html2pdf</title>
<link>https://dudasprogramacion.com/2678/problema-con-html2pdf?show=2693#a2693</link>
<description>Hola, el problema parece ser que está mal formado el html que tienes en $html, ¿podrías mostrar el contenido de esa variable?</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2678/problema-con-html2pdf?show=2693#a2693</guid>
<pubDate>Wed, 13 Jan 2021 13:03:28 +0000</pubDate>
</item>
<item>
<title>AYUDA PARA UN PROYECTO DEBASE DE DATOS</title>
<link>https://dudasprogramacion.com/2644/ayuda-para-un-proyecto-debase-de-datos</link>
<description>ESTOY POR COMENZAR UN PROYECTO REFERENTE A UN INVENTARIO&lt;br /&gt;
&lt;br /&gt;
SOLO ME GUSTARIA SABER COMO HACER PARA &amp;nbsp;SABER COMO SUMAR Y RESTAR COSAS DEL INVENTARIO GRACIAS</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2644/ayuda-para-un-proyecto-debase-de-datos</guid>
<pubDate>Fri, 25 Sep 2020 17:46:10 +0000</pubDate>
</item>
<item>
<title>Buscador en tiempo real para galería de iamgenes</title>
<link>https://dudasprogramacion.com/2638/buscador-en-tiempo-real-para-galeria-de-iamgenes</link>
<description>&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0cm&quot;&gt;&lt;span style=&quot;color:black; font-family:&amp;quot;Trebuchet MS&amp;quot;,sans-serif; font-size:13.0pt&quot;&gt;Hola buenas tardes, soy nuevo y quería solicitar apoyo ya que estoy tratando de incorporar un buscador en tiempo real a un código con el objetivo de ir filtrando las imágenes que se muestran luego de ir escribiendo en el buscador, el proyecto con el que estoy trabajando está en:&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0cm&quot;&gt;&lt;span style=&quot;color:black; font-family:&amp;quot;Trebuchet MS&amp;quot;,sans-serif; font-size:13.0pt&quot;&gt;&amp;nbsp;&lt;a href=&quot;http://www.mediafire.com/file/37km5babdfski1g/file&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://www.mediafire.com/file/37km5babdfski1g/file&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0cm;box-sizing: border-box;font-variant-ligatures: normal; font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px; text-decoration-style: initial;text-decoration-color: initial;word-spacing: 0px&quot;&gt;&lt;span style=&quot;color:black; font-family:&amp;quot;Trebuchet MS&amp;quot;,sans-serif; font-size:13.0pt&quot;&gt;De ante mano les agradezco mucho su apoyo.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-top:0cm;box-sizing: border-box;font-variant-ligatures: normal; font-variant-caps: normal;orphans: 2;text-align:start;widows: 2;-webkit-text-stroke-width: 0px; text-decoration-style: initial;text-decoration-color: initial;word-spacing: 0px&quot;&gt;&lt;span style=&quot;color:black; font-family:&amp;quot;Trebuchet MS&amp;quot;,sans-serif; font-size:13.0pt&quot;&gt;Saludos. Julio P.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2638/buscador-en-tiempo-real-para-galeria-de-iamgenes</guid>
<pubDate>Sat, 05 Sep 2020 20:40:25 +0000</pubDate>
</item>
<item>
<title>Tener un listado de los archivos php y tiempos de carga de archivos de la compilacion que realiza PHP?</title>
<link>https://dudasprogramacion.com/2635/tener-listado-archivos-tiempos-archivos-compilacion-realiza</link>
<description>Hola comunidad, ayuda: ¿Como podria rastrear que file.php esta retrasando la cargar de las paginas de un sitio web? el sitio web esta online en produccion, lleva wordpress y exite la posibilidad de tener una lista en tiempos de carga de la compilacion que realiza PHP???</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2635/tener-listado-archivos-tiempos-archivos-compilacion-realiza</guid>
<pubDate>Mon, 10 Aug 2020 16:07:04 +0000</pubDate>
</item>
<item>
<title>Problemas  con php  al enlazar css</title>
<link>https://dudasprogramacion.com/2505/problemas-con-php-al-enlazar-css</link>
<description>&lt;p&gt;&lt;span style=&quot;color:#121212; font-family:Muli,sans-serif; font-size:15px&quot;&gt;Buenas noches,no puedo enlazar el archivo.css en mi php.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Como hago para poder enlazar css al parecer la etiqueta link no funciona,el href no me muestra los archivos que están el directorio y no me enlaza el css, necesito esa ayuda ya que también la etiqueta style tampoco me funciona.&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2505/problemas-con-php-al-enlazar-css</guid>
<pubDate>Mon, 13 Jul 2020 23:28:38 +0000</pubDate>
</item>
<item>
<title>proteccion contra fuerza bruta</title>
<link>https://dudasprogramacion.com/2482/proteccion-contra-fuerza-bruta</link>
<description>&lt;p&gt;que debo hacer cuando me sale este error:&amp;nbsp;&lt;strong&gt;Warning&lt;/strong&gt;&lt;span style=&quot;color:#000000; font-family:&amp;quot;Times New Roman&amp;quot;; font-size:medium&quot;&gt;: mysqli::prepare(): Couldn&#039;t fetch mysqli in...&lt;/span&gt;&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2482/proteccion-contra-fuerza-bruta</guid>
<pubDate>Fri, 26 Jun 2020 18:46:00 +0000</pubDate>
</item>
<item>
<title>validacion de un formulario</title>
<link>https://dudasprogramacion.com/2480/validacion-de-un-formulario</link>
<description>Hola, he estado haciendo un formulario de registro y todo iba muy bien, conexion a la base de datos, validar los campos requeridos, todo. Cuando intento validar que no existan usuarios y correos iguales en la base de datos, al ejecutar se omiten la validacion de los campos requiridos y solo verifica si hay usuarios o correos iguales. Sino hay datos iguales en la base de datos, los registra sin validar los campos requeridos. He revisado mucho el codigo y aparentemente todo esta en el orden correcto. Ayuda:c</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2480/validacion-de-un-formulario</guid>
<pubDate>Mon, 22 Jun 2020 17:58:10 +0000</pubDate>
</item>
<item>
<title>Respondido: El codigo de PHP no compila</title>
<link>https://dudasprogramacion.com/2449/el-codigo-de-php-no-compila?show=2451#a2451</link>
<description>Me suena que no está iniciado el servicio de Apache &lt;br /&gt;
&lt;br /&gt;
Esto ocurre en un hosting en linea? En ambiente local? Windows? Linix?</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2449/el-codigo-de-php-no-compila?show=2451#a2451</guid>
<pubDate>Mon, 25 May 2020 06:30:19 +0000</pubDate>
</item>
<item>
<title>¿Cómo eliminar esta información?</title>
<link>https://dudasprogramacion.com/2395/como-eliminar-esta-informacion</link>
<description>&lt;p&gt;Creo que debo de haber configurado mal algún packages en Atom porque me parece información adicional en Xampp.&amp;nbsp;&lt;/p&gt;&lt;p&gt;En Atom escribo:&lt;/p&gt;&lt;p&gt;&amp;lt;?php&lt;/p&gt;&lt;p&gt;print &#039;hola mundo&#039;&lt;/p&gt;&lt;p&gt;?&amp;gt;&lt;/p&gt;&lt;p&gt;y en Xampp me aparece:&lt;/p&gt;&lt;p&gt;hola mundo &lt;span style=&quot;background-color:#f1c40f&quot;&gt;función Name() { } #000000 ?&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;¿Cómo puedo hacer para que no me aparezca la info subrayada en amarillo?&lt;/p&gt;&lt;p&gt;¡Un saludo!&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2395/como-eliminar-esta-informacion</guid>
<pubDate>Fri, 01 May 2020 11:18:27 +0000</pubDate>
</item>
<item>
<title>Como cambiar titulo separado por un guion</title>
<link>https://dudasprogramacion.com/2388/como-cambiar-titulo-separado-por-un-guion</link>
<description>&lt;p&gt;Buenas, perdon si mi pregunta es demasiado tonta, pero recien estoy empezando a aprender PHP, tengo una web hecha con Wordpress de musica&amp;nbsp;y los titulos de los post son todos &lt;strong&gt;NOMBRE DEL GRUPO - NOMBRE DE LA CANCION&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;img alt=&quot;&quot; src=&quot;https://www.karaokes.com.ar/Captura.JPG&quot; style=&quot;height:76px; width:500px&quot;&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;the_title();&lt;/p&gt;&lt;p&gt;muestra esto&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;img alt=&quot;&quot; src=&quot;https://www.karaokes.com.ar/Captura1.JPG&quot; style=&quot;height:168px; width:500px&quot;&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Pero la idea seria mostrar:&lt;br&gt;&lt;strong&gt;Me canse de usted - Las Diosas del Vallenato&lt;br&gt;o sea poner primero NOMBRE CANCION -&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;NOMBRE DEL GRUPO&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Siempre los titulos estas separados por un guion medio &quot;-&quot;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Gracias a todos!&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2388/como-cambiar-titulo-separado-por-un-guion</guid>
<pubDate>Sat, 25 Apr 2020 15:53:57 +0000</pubDate>
</item>
<item>
<title>Configuración del htaccess propagado a 5.6</title>
<link>https://dudasprogramacion.com/2387/configuracion-del-htaccess-propagado-a-5-6</link>
<description>Que tal buen día tengo una aplicación web que subí a mi hosting de hostgator sin embargo mi versión de php es la 5.6 y el hostgator tiene la 7 en adelante &lt;br /&gt;
&lt;br /&gt;
Solicite que me lo habilitarán esa versión y me comentaron que ya me la habilitaron que fue en el htaccess pero no entiendo por que ko se despliega aun mi aplicación no la puedo ver &lt;br /&gt;
&lt;br /&gt;
En modo local si la puedo ver pero en la web no ya hice mis configuraciones tanto user pass link host todo y nada</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2387/configuracion-del-htaccess-propagado-a-5-6</guid>
<pubDate>Thu, 23 Apr 2020 19:23:23 +0000</pubDate>
</item>
<item>
<title>imprimir imagen dentro php</title>
<link>https://dudasprogramacion.com/2284/imprimir-imagen-dentro-php</link>
<description>&lt;pre&gt;&lt;span style=&quot;color:#101094; font-family:inherit&quot;&gt;while&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;$fetch &lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt; mysqli_fetch_array&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;$query&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;)){&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;
                echo&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;&quot;&amp;lt;tr&amp;gt;
                    &amp;lt;td&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;$fetch&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;&#039;fecha&#039;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;].&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;&quot;&amp;lt;/td&amp;gt;
                    &amp;lt;td&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;$fetch&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;&#039;nombre&#039;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;].&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;&quot;&amp;lt;/td&amp;gt;
                    &amp;lt;td&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;$fetch&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;&#039;codigo&#039;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;].&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;&quot;&amp;lt;/td&amp;gt;
                    &amp;lt;td&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;$fetch&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;&#039;correo&#039;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;].&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;&quot;&amp;lt;/td&amp;gt;
                    &amp;lt;td&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;$fetch&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;&#039;img&#039;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;].&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;&quot;&amp;lt;/td&amp;gt;
                    &amp;lt;/tr&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;
            &lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;*********************&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;
but I want to &lt;/span&gt;&lt;span style=&quot;color:#101094; font-family:inherit&quot;&gt;use&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color:#101094; font-family:inherit&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt; structure&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;

&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;&amp;lt;td&amp;gt;&amp;lt;center&amp;gt;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;img src&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;&quot;&amp;lt;?php echo &quot;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;upload&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;&quot;.$fetch[&#039;img&#039;]?&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt; width&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;&quot;165&quot;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt; height&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;&quot;165&quot;&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color:#7d2727; font-family:inherit&quot;&gt;/center&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;td&lt;/span&gt;&lt;span style=&quot;color:#303336; font-family:inherit&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2284/imprimir-imagen-dentro-php</guid>
<pubDate>Mon, 04 Nov 2019 19:10:05 +0000</pubDate>
</item>
<item>
<title>Respondido: Como puedo reemplazar las &quot;x&quot; de un string por numeros aleatorios</title>
<link>https://dudasprogramacion.com/2274/como-puedo-reemplazar-las-de-string-por-numeros-aleatorios?show=2276#a2276</link>
<description>&lt;p&gt;Tienes que utilizar la función preg_replace que solo reemplaza un carácter. Y esto lo tienes que hacer mientras haya x en tu cadena. Para ello te tienes que apoyar en la función strpos()&lt;/p&gt;&lt;pre&gt;&amp;lt;?php

$lista = &#039;12345xxxxx&#039;;
while (strpos($lista, &#039;x&#039;)) {
 $lista = preg_replace(&#039;/x/&#039;, rand(0,9), $lista, 1);
}
echo $lista;
?&amp;gt;&lt;/pre&gt;&lt;p&gt;Espero que te sirva.&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2274/como-puedo-reemplazar-las-de-string-por-numeros-aleatorios?show=2276#a2276</guid>
<pubDate>Mon, 21 Oct 2019 21:43:53 +0000</pubDate>
</item>
<item>
<title>Respondido: Bloquear automaticamente ips</title>
<link>https://dudasprogramacion.com/2250/bloquear-automaticamente-ips?show=2259#a2259</link>
<description>Te diría que comiences evaluar el contenido de las IPs (las variables $ipTest y $_SERVER[&amp;quot;REMOTE_ADDR&amp;quot;]) para ver que efectivamente coincidan.&lt;br /&gt;
&lt;br /&gt;
Luego, no comprendo por qué usas substr_count y no un simple ==&lt;br /&gt;
&lt;br /&gt;
Y ¿por qué comparas con un &amp;quot;0&amp;quot; en lugar de un 0?&lt;br /&gt;
&lt;br /&gt;
¿Cómo deberían llegar las ips al block de notas?</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2250/bloquear-automaticamente-ips?show=2259#a2259</guid>
<pubDate>Tue, 17 Sep 2019 18:19:57 +0000</pubDate>
</item>
<item>
<title>Consulta pregunta sobre extensiones clases e interfaces</title>
<link>https://dudasprogramacion.com/2255/consulta-pregunta-sobre-extensiones-clases-e-interfaces</link>
<description>Estoy comenzando en php y no logro dar respuesta a esta pregunta alguien puede orientarme?.&lt;br /&gt;
&lt;br /&gt;
Al utilizar variables y funciones en PHP mencione qué extensiones y qué clases e interfaces reconoce como parte del lenguaje.</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2255/consulta-pregunta-sobre-extensiones-clases-e-interfaces</guid>
<pubDate>Sun, 15 Sep 2019 20:07:49 +0000</pubDate>
</item>
<item>
<title>hola que tal, mi grafica no se pinta</title>
<link>https://dudasprogramacion.com/2248/hola-que-tal-mi-grafica-no-se-pinta</link>
<description>&lt;p&gt;Hola que tal buenas tardes, javascript me muestra mi consulta undefined, lo que quiero hacer es pintar mi gráfica, ya le busque pero no encuentro la solución, espero y me puedan ayudar gracias,&lt;/p&gt;&lt;p&gt;este es mi js&lt;/p&gt;&lt;pre&gt;$(document).ready(function(){

  $.ajax({
    type : &quot;POST&quot;,
    url : &quot;consulta_reporte.php&quot;,

    success : function(data){
      alert(data);

      var sample_id = [];
      var expected_value_reporte = [];
      var min_2std_reporte = [];
      var plus_2std_reporte = [];

      for(var i in data) {
        sample_id.push(data[i].sample_id);
        expected_value_reporte.push(data[i].expected_value);
        min_2std_reporte.push(data[i].min_2std);
        plus_2std_reporte.push(data[i].plus_2std);
      }

      var chartdata = {
        labels: sample_id,
        datasets: [
          {
            label: &quot;expected_value&quot;,
            fill: false,
            lineTension: 0.1,
            backgroundColor: &quot;rgba(59, 89, 152, 0.75)&quot;,
            borderColor: &quot;rgba(59, 89, 152, 1)&quot;,
            pointHoverBackgroundColor: &quot;rgba(59, 89, 152, 1)&quot;,
            pointHoverBorderColor: &quot;rgba(59, 89, 152, 1)&quot;,
            data: expected_value_reporte
          },
          {
            label: &quot;min_2std&quot;,
            fill: false,
            lineTension: 0.1,
            backgroundColor: &quot;rgba(29, 202, 255, 0.75)&quot;,
            borderColor: &quot;rgba(29, 202, 255, 1)&quot;,
            pointHoverBackgroundColor: &quot;rgba(29, 202, 255, 1)&quot;,
            pointHoverBorderColor: &quot;rgba(29, 202, 255, 1)&quot;,
            data: min_2std_reporte
          },
          {
            label: &quot;plus_2std&quot;,
            fill: false,
            lineTension: 0.1,
            backgroundColor: &quot;rgba(211, 72, 54, 0.75)&quot;,
            borderColor: &quot;rgba(211, 72, 54, 1)&quot;,
            pointHoverBackgroundColor: &quot;rgba(211, 72, 54, 1)&quot;,
            pointHoverBorderColor: &quot;rgba(211, 72, 54, 1)&quot;,
            data: plus_2std_reporte
          } 
        ]
      };

      var ctx = $(&quot;#resultado&quot;);

      var LineGraph = new Chart(ctx, {
        type: &#039;line&#039;,
        data: chartdata
      });
    },
    error : function(data) {

    }
  });
});

Y mi consulta_reporte.php es este, aquí lo que hago es llamar una consulta 
anidada donde selecciono tres combos y al ultimo muestro la gráfica, con
 este script que dejo a continuación.

&amp;lt;?php

?&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;&amp;gt;
  &amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt; Generar Reporte&amp;lt;/title&amp;gt;

    &amp;lt;style&amp;gt;
      .chart-container {
        width: 640px;
        height: auto;
      }
    &amp;lt;/style&amp;gt;
    &amp;lt;!-- javascript --&amp;gt;
    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;jquery.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;Chart.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type=&quot;text/javascript&quot; src=&quot;linegraph.js&quot;&amp;gt;&amp;lt;/script&amp;gt;

  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;


    &amp;lt;?php

    $host = &#039;127.0.0.1&#039;;
    $port = &#039;5432&#039;;
    $database = &#039;pos&#039;;
    $user = &#039;postgres&#039;;
    $password = &#039;&#039;;

    $cnx = pg_connect(
      &#039;host=&#039; . $host . &#039; port=&#039; . $port . &#039; dbname=&#039; . $database .
      &#039; user=&#039; . $user . &#039; password=&#039; . $password
  );

    $qr = &quot;select * from vw_dhqc_report&quot;;

    $year = &#039;year&#039;;
    $id_control = &#039;id_control&#039;;
    $element = &#039;element&#039;;



    // header(&quot;Content-Type: text/html;charset=utf-8&quot;);
    $query4 = &quot;SELECT
        DISTINCT year, id_control, element,
        returned_value, expected_value,
        sample_id, min_2std, plus_3std, plus_2std
      FROM vw_dhqc_report
      WHERE
      &#039;$_POST[$year]&#039; = year AND 
      &#039;$_POST[$id_control]&#039;= id_control AND
      &#039;$_POST[$element]&#039;= element
    &quot;;
    $result4 = pg_query($query4);

    ?&amp;gt;
    &amp;lt;?php

    $resutado = array();
    while ($row = pg_fetch_assoc($result4)) {
      $resutado[] = $row;
    }
    http_response_code(200);
    header(&quot;Content-Type →application/json; charset=utf-8&quot;);
    // echo json_encode($resutado);
    pg_close($cnx);




    ?&amp;gt;

    &amp;lt;div class=&quot;chart-container&quot;&amp;gt;
      &amp;lt;canvas id=&quot;resultado&quot;&amp;gt;&amp;lt;/canvas&amp;gt;
    &amp;lt;/div&amp;gt;

  &amp;lt;/body&amp;gt;
  &amp;lt;/html&amp;gt;
este es mi index.php donde lleno los combos 
&amp;lt;form  id=&quot;formulario&quot; action=&quot;&quot; method=&quot;post&quot;&amp;gt;
    &amp;lt;h3&amp;gt;Seleccione una Opci&amp;amp;oacute;n&amp;lt;h3&amp;gt;
    &amp;lt;!-- &amp;lt;h3&amp;gt;year&amp;lt;/h3&amp;gt; --&amp;gt;
    &amp;lt;select name=&quot;year&quot; id=&quot;year_id&quot;&amp;gt;
    &amp;lt;option value=&quot;&quot;&amp;gt;Seleccionar&amp;lt;/option&amp;gt;
    &amp;lt;?php
     $query = &quot;select distinct $year from vw_dhqc_report order by year desc&quot;;
     $result = pg_query($query);

     while($fila=pg_fetch_array($result)){
     echo &quot;&amp;lt;option value=&#039;&quot;.$fila[&#039;year&#039;].&quot;&#039;&amp;gt;&quot;.$fila[&#039;year&#039;].&quot;&amp;lt;/option&amp;gt;&quot;;
     }
    ?&amp;gt;
    &amp;lt;/select&amp;gt;
    &amp;lt;!-- &amp;lt;h3&amp;gt;id_control&amp;lt;/h3&amp;gt; --&amp;gt;
    &amp;lt;select name=&quot;id_control&quot; id=&quot;control_id&quot;&amp;gt;
    &amp;lt;option value=&quot;0&quot;&amp;gt;Seleccionar&amp;lt;/option&amp;gt;
     &amp;lt;/select&amp;gt;
     &amp;lt;!-- &amp;lt;h3&amp;gt;Element&amp;lt;/h3&amp;gt; --&amp;gt;
     &amp;lt;select name=&quot;element&quot; id=&quot;element_id&quot;&amp;gt;
    &amp;lt;option value=&quot;0&quot;&amp;gt;Seleccionar&amp;lt;/option&amp;gt;
     &amp;lt;/select&amp;gt;
    &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
      &amp;lt;?php

      ?&amp;gt;
    &amp;lt;/form&amp;gt;


    &amp;lt;script src=&quot;https://code.jquery.com/jquery-3.2.1.js&quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script&amp;gt;
    $(document).ready(function(){
        $(&#039;#year_id&#039;).on(&#039;change&#039;, function(){
            var year = $(this).val();
            if(year){
                $.ajax({
                    type:&#039;POST&#039;,
                    url: &#039;control.php&#039;,
                    data:&#039;year=&#039;+year,
                    success:function(data){
                        $(&#039;#control_id&#039;).html(data);   
                  }   

                }); 
            }else{
                $(&#039;#control_id&#039;).html(&#039;&amp;lt;option value=&quot;&quot;&amp;gt;Select year&amp;lt;/option&amp;gt;&#039;);
            }
        });

    $(&#039;#control_id&#039;).on(&#039;change&#039;, function(){
            var id_control = $(this).val();
            var year =$(&#039;#year_id&#039;).val();

            // var  element = {&#039;year&#039;:year,&#039;id_control&#039;:id_control};
            if(id_control){
                $.ajax({
                    type:&#039;POST&#039;,
                    url:&#039;element.php&#039;,
                     data: element = {&#039;year&#039;:year,&#039;id_control&#039;:id_control},

                    success:function(data){
                        $(&#039;#element_id&#039;).html(data);


                    }
                });
            }else{
                $(&#039;#element_id&#039;).html(&#039;&amp;lt;div value=&quot;&quot;&amp;gt;Select id_control&amp;lt;/div&amp;gt;&#039;);
            }
         });
      $(&#039;#element_id&#039;).on(&#039;change&#039;, function(){
            var id_element = $(this).val();
            var year =$(&#039;#year_id&#039;).val();
             var id_control =  $(&#039;#control_id&#039;).val();

            if(id_element){
                $.ajax({
                    type:&#039;POST&#039;,
                    url:&#039;consulta_reporte.php&#039;,

                    data: element = {&#039;element&#039;:id_element,&#039;year&#039;:year,&#039;id_control&#039;:id_control},

                    success:function(data){
                        $(&#039;#resultado&#039;).html(data);


                    }
                });
            }else{
                $(&#039;#resultado&#039;).html(&#039;&amp;lt;div value=&quot;&quot;&amp;gt;Mostrar Tabla&amp;lt;/div&amp;gt;&#039;);
            }
         });
        });
      &amp;lt;/script&amp;gt;

&amp;lt;div id=&quot;resultado&quot;&amp;gt;

        &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2248/hola-que-tal-mi-grafica-no-se-pinta</guid>
<pubDate>Wed, 07 Aug 2019 20:03:36 +0000</pubDate>
</item>
<item>
<title>Respondido: Desarrollo Herramienta Web Framework/Entorno open source (PHP).</title>
<link>https://dudasprogramacion.com/2214/desarrollo-herramienta-web-framework-entorno-open-source?show=2242#a2242</link>
<description>&lt;p&gt;¡Hola! Si quieres encontrar un buen trabajo en el sector de la programación, el&amp;nbsp;cual&amp;nbsp;se ha desarrollado bastante&amp;nbsp;durante los últimos 10&amp;nbsp;años, puedes echarle un vistazo a esta página&amp;nbsp;&lt;a rel=&quot;nofollow&quot; href=&quot;https://es.jobsora.com/&quot;&gt;https://es.jobsora.com/&lt;/a&gt; que tiene muchas ofertas laborales. ¡Un saludo!&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2214/desarrollo-herramienta-web-framework-entorno-open-source?show=2242#a2242</guid>
<pubDate>Wed, 17 Jul 2019 15:07:16 +0000</pubDate>
</item>
<item>
<title>Respondido: No puedo escribir los datos en mi archivo.txt</title>
<link>https://dudasprogramacion.com/2237/no-puedo-escribir-los-datos-en-mi-archivo-txt?show=2238#a2238</link>
<description>Para empezar, quita las @ del comienzo de cada instrucción... de otro modo nunca verás los errores y será muy complejo entender lo que sucede.&lt;br /&gt;
&lt;br /&gt;
Luego de eso publica los errores que encuentras y veremos qué pasa.</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2237/no-puedo-escribir-los-datos-en-mi-archivo-txt?show=2238#a2238</guid>
<pubDate>Tue, 16 Jul 2019 14:35:53 +0000</pubDate>
</item>
<item>
<title>Respondido: Enviar un correo por php</title>
<link>https://dudasprogramacion.com/2227/enviar-un-correo-por-php?show=2228#a2228</link>
<description>&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://academy.leewayweb.com/como-enviar-emails-desde-php/&quot;&gt;Aquí&lt;/a&gt; tienes las instrucciones.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Saludos.&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2227/enviar-un-correo-por-php?show=2228#a2228</guid>
<pubDate>Fri, 28 Jun 2019 17:54:58 +0000</pubDate>
</item>
<item>
<title>Respondido: Dudas Creación Foro</title>
<link>https://dudasprogramacion.com/2215/dudas-creacion-foro?show=2226#a2226</link>
<description>Se me hace un poco confuso leer todo ese código... a priori lo que te recomiendo es que no abras y cierres la conexión a la base de datos en cada lugar... podrías hacer eso antes de evaluar la acción particular que se necesita..</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2215/dudas-creacion-foro?show=2226#a2226</guid>
<pubDate>Sun, 23 Jun 2019 23:20:48 +0000</pubDate>
</item>
<item>
<title>Respondido: ¿Cómo puedo que un SELECT me muestre ciertos datos obtenidos de la base de datos</title>
<link>https://dudasprogramacion.com/2209/como-puedo-select-muestre-ciertos-datos-obtenidos-base-datos?show=2221#a2221</link>
<description>Muestra como lo estás intentando hacer</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2209/como-puedo-select-muestre-ciertos-datos-obtenidos-base-datos?show=2221#a2221</guid>
<pubDate>Thu, 20 Jun 2019 21:27:19 +0000</pubDate>
</item>
<item>
<title>Respondido: Conectar un archivo PHP a otro PHP</title>
<link>https://dudasprogramacion.com/2199/conectar-un-archivo-php-a-otro-php?show=2210#a2210</link>
<description>&lt;p&gt;En principio la información que envías deberías recibirla en un archivo llamado&amp;nbsp;&lt;span style=&quot;color:#34495e; font-family:Ubuntu,Helvetica,Arial,FreeSans,sans-serif&quot;&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;buscar.php &lt;/span&gt;&lt;span style=&quot;font-family:Arial,Helvetica,sans-serif&quot;&gt;(Como indica tu formulario):&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:Courier New,Courier,monospace&quot;&gt;&lt;span style=&quot;color:#34495e&quot;&gt;&amp;lt;form id=&quot;propietario.php&quot; action=&quot;buscar.php&quot; method=&quot;POST&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2199/conectar-un-archivo-php-a-otro-php?show=2210#a2210</guid>
<pubDate>Mon, 03 Jun 2019 17:24:56 +0000</pubDate>
</item>
<item>
<title>Respondido: No puedo hacer que mi registro se almacene en mi Base de datos</title>
<link>https://dudasprogramacion.com/2177/no-puedo-hacer-que-mi-registro-se-almacene-en-mi-base-de-datos?show=2195#a2195</link>
<description>&lt;p&gt;¿Sale alguno de los mensajes que pusiste? (&quot;&lt;span style=&quot;color:#34495e; font-family:Ubuntu,Helvetica,Arial,FreeSans,sans-serif&quot;&gt;Los datos fueron insertados correctamente&lt;/span&gt;&quot; o&amp;nbsp;&lt;span style=&quot;color:#34495e; font-family:Ubuntu,Helvetica,Arial,FreeSans,sans-serif&quot;&gt;&quot;Los datos no han sido insertados&quot;&lt;/span&gt;).&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Si te fijas &lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://www.php.net/manual/es/pdo.query.php&quot;&gt;la ayuda del método query&lt;/a&gt;&amp;nbsp;notarás que su objetivo es realizar consultas tipo SELECT. Para INSERT debes usar el método &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.php.net/manual/es/pdo.exec.php&quot;&gt;exec&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Saludos&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2177/no-puedo-hacer-que-mi-registro-se-almacene-en-mi-base-de-datos?show=2195#a2195</guid>
<pubDate>Mon, 22 Apr 2019 19:32:36 +0000</pubDate>
</item>
<item>
<title>Respondido: No puedo imprimir fechas,  (PHP Y MYSQL)</title>
<link>https://dudasprogramacion.com/1601/no-puedo-imprimir-fechas-php-y-mysql?show=2187#a2187</link>
<description>¿Podrías mostrar algo de código?</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/1601/no-puedo-imprimir-fechas-php-y-mysql?show=2187#a2187</guid>
<pubDate>Sat, 13 Apr 2019 18:48:16 +0000</pubDate>
</item>
<item>
<title>Respondido: como hacer un inventario de excel a php</title>
<link>https://dudasprogramacion.com/1941/como-hacer-un-inventario-de-excel-a-php?show=2186#a2186</link>
<description>&lt;p&gt;Hola:&lt;/p&gt;&lt;p&gt;&amp;nbsp; Una librería muy buena que puedes usar para interactuar con Excel desde PHP es &lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://phpspreadsheet.readthedocs.io/en/develop/&quot;&gt;PHPSpreadsheet&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;a target=&quot;_blank&quot; rel=&quot;nofollow&quot; href=&quot;https://academy.leewayweb.com/como-interactuar-con-excel-desde-php/&quot;&gt;Acá&lt;/a&gt; te dejo un artículo con ejemplos de uso.&lt;/p&gt;&lt;p&gt;Saludos!&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/1941/como-hacer-un-inventario-de-excel-a-php?show=2186#a2186</guid>
<pubDate>Sat, 13 Apr 2019 18:14:08 +0000</pubDate>
</item>
<item>
<title>Ejercicio avanzado de PHP</title>
<link>https://dudasprogramacion.com/2181/ejercicio-avanzado-de-php</link>
<description>&lt;p&gt;Buenas noches ,&lt;/p&gt;&lt;p&gt;Si alguien me puede ayudar con este ejercicio se lo agradeceria , ya tengo el formulario principal creado, lo que no entiendo es si el session_start debe ir en ambas paginas y si la cookie se debe crear en pagina 1 o pagina 2.&lt;/p&gt;&lt;p style=&quot;text-align:center&quot;&gt;Elaborar un formulario para inicio de sesión de un usuario, siga estos pasos (50%):&lt;br&gt;- Usar dos páginas,&amp;nbsp;&amp;nbsp; “pagina1.php”&amp;nbsp; y “pagina2.php”&lt;br&gt;- En pagina1.php crear un campo para&amp;nbsp; un nombre de usuario y uno para su edad.&lt;br&gt;- Si la persona es mayor de edad permitirá iniciar sesión caso contrario no.&lt;br&gt;- Si se puede iniciar sesión deberá guardar en una cookie el valor del año de nacimiento de la persona y recuperar ese valor para que en la página2.php&lt;br&gt;donde estará la sesión activa y aparezca “Bienvenido Sr. User, usted nació en el año de 1900” como por ejemplo...&lt;br&gt;- Si no se puede iniciar sesión que se mantenga en el formulario de acceso y no permita llegar a pagina2.php y muestre un mensaje que diga “Usted es menor de Edad”&lt;/p&gt;&lt;p style=&quot;text-align:center&quot;&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2181/ejercicio-avanzado-de-php</guid>
<pubDate>Mon, 01 Apr 2019 01:21:14 +0000</pubDate>
</item>
<item>
<title>Respondido: Quiero imprimir ciertos elementos en un arreglo foreach en php</title>
<link>https://dudasprogramacion.com/2166/quiero-imprimir-ciertos-elementos-en-un-arreglo-foreach-php?show=2173#a2173</link>
<description>&lt;p&gt;Solución con foreach...&lt;/p&gt;&lt;pre&gt;foreach ($arr as $e) {
   if (($e == &#039;noche&#039;) || ($e == &#039;luna&#039;))
        echo $e.&#039; &#039;;
}

echo &#039;&amp;lt;br&amp;gt;&#039;;

foreach ($arr as $clave=&amp;gt;$e) {
   if (($clave==1) || ($clave==3))
      echo $e.&#039; &#039;;
}&lt;/pre&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2166/quiero-imprimir-ciertos-elementos-en-un-arreglo-foreach-php?show=2173#a2173</guid>
<pubDate>Tue, 19 Mar 2019 17:33:24 +0000</pubDate>
</item>
<item>
<title>Respondido: como cargar contenido de paginas en un solo index.php?</title>
<link>https://dudasprogramacion.com/2161/como-cargar-contenido-de-paginas-en-un-solo-index-php?show=2163#a2163</link>
<description>&lt;p&gt;Buenas Cristianhz,&lt;/p&gt;&lt;p&gt;Lo que tienes que hacer es utilizar un frame o un iframe en HTML.&lt;/p&gt;&lt;pre&gt;&amp;lt;frameset cols=&quot;20%,*&quot;&amp;gt;
    &amp;lt;frame src=&quot;frame1.php&quot; name=&quot;izquierda&quot;&amp;gt;
    &amp;lt;frame src=&quot;frame2.php&quot; name=&quot;derecha&quot;&amp;gt;
&amp;lt;/frameset&amp;gt;&lt;/pre&gt;&lt;p&gt;Tienes más ejemplos en&amp;nbsp;&lt;a href=&quot;http://lineadecodigo.com/tag/html-frames/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://lineadecodigo.com/tag/html-frames/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Espero que te ayude.&lt;/p&gt;&lt;p&gt;Saludos.&lt;br&gt;Víctor.&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2161/como-cargar-contenido-de-paginas-en-un-solo-index-php?show=2163#a2163</guid>
<pubDate>Wed, 13 Mar 2019 15:08:57 +0000</pubDate>
</item>
<item>
<title>Borrar registro</title>
<link>https://dudasprogramacion.com/2153/borrar-registro</link>
<description>Hola a todos, estoy programando en laravel y soy nuevo en esto, me gustaría que me ayudaran con una duda que tengo.&lt;br /&gt;
&lt;br /&gt;
Veran hice una vista para que el usuario pueda cambiar su contraseña en esa vista paso por get en la url el id y el token quisiera saber como podría hacerle para que al momento de que se cambie la contraseña se elimine el registro de ese token y ese id para asi no se vuelva a repetir o no pueda volver a ingresar de nuevo el usuario en caso de copiar la url,&lt;br /&gt;
&lt;br /&gt;
espero me explique.&lt;br /&gt;
&lt;br /&gt;
Saludos!</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2153/borrar-registro</guid>
<pubDate>Wed, 30 Jan 2019 00:02:39 +0000</pubDate>
</item>
<item>
<title>que funcion hace este codigo: if (!defined(&#039;CONTROLADOR&#039;))     exit; por fa ayudenme</title>
<link>https://dudasprogramacion.com/2107/funcion-hace-este-codigo-defined-controlador-exit-ayudenme</link>
<description></description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2107/funcion-hace-este-codigo-defined-controlador-exit-ayudenme</guid>
<pubDate>Thu, 11 May 2017 00:35:46 +0000</pubDate>
</item>
<item>
<title>Respondido: Como hago para que cuando regrese a mi página anterior vaya exactamente al sitio desde hice click</title>
<link>https://dudasprogramacion.com/2047/cuando-regrese-pagina-anterior-exactamente-sitio-desde-click?show=2090#a2090</link>
<description>Usa anchor links.&lt;br /&gt;
&lt;br /&gt;
Ejemplo: &lt;a href=&quot;http://scrollmagic.io/examples/advanced/anchor_link_scrolling.html#top&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://scrollmagic.io/examples/advanced/anchor_link_scrolling.html#top&lt;/a&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2047/cuando-regrese-pagina-anterior-exactamente-sitio-desde-click?show=2090#a2090</guid>
<pubDate>Mon, 10 Apr 2017 11:40:13 +0000</pubDate>
</item>
<item>
<title>validar usuario y email</title>
<link>https://dudasprogramacion.com/2033/validar-usuario-y-email</link>
<description></description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2033/validar-usuario-y-email</guid>
<pubDate>Sun, 12 Feb 2017 18:44:51 +0000</pubDate>
</item>
<item>
<title>Hola amigos acerca de sysdate quien me apoya</title>
<link>https://dudasprogramacion.com/2032/hola-amigos-acerca-de-sysdate-quien-me-apoya</link>
<description>&lt;p&gt;Resulta que me atore con este código &amp;nbsp;&lt;span style=&quot;background-color:rgb(241, 240, 240); color:rgb(75, 79, 86); font-family:helvetica,arial,sans-serif; font-size:12px&quot;&gt;Delete from tabla where fecha_expiracion &amp;lt; sysdate; para borrar los datos de una tabla según su fecha de expiración alguien me podria asesorar en la implementación de esta etiqueta ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color:rgb(241, 240, 240); color:rgb(75, 79, 86); font-family:helvetica,arial,sans-serif; font-size:12px&quot;&gt;de antemano se los agradesco. :)&lt;/span&gt;&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2032/hola-amigos-acerca-de-sysdate-quien-me-apoya</guid>
<pubDate>Fri, 10 Feb 2017 14:46:51 +0000</pubDate>
</item>
<item>
<title>Generación de reportes en pdf con jasperReports y Linux</title>
<link>https://dudasprogramacion.com/2025/generacion-de-reportes-en-pdf-con-jasperreports-y-linux</link>
<description>&lt;p&gt;Buen dia muchachos, tengo un inconveniente en cuanto a la generación de reportes en pdf con jasperReports y Linux..&lt;/p&gt;&lt;p&gt;Primero que nada, en windows todo me va de maravilla (todo apunta a ser por permisos de carpetas y archivos), pero al estar en linux cuando se ejecuta el codigo, solo es capaz de transformar el .jrxml en .jasper, y ya de alli no me lo transforma en .pdf.. cabe destacar que revise el input que ejectutaba el php exec(), y todo esta en orden.. incluso copie el codigo en la terminal y construyo el .pdf sin problemas.. ahora bien, ya probe con sudo chmod -R 777 &amp;lt;carpeta_del_lib_php_jasper&amp;gt;, con sudo chmod -x para permisos de ejecucion, con sudo chown (mi usuario, www-data, daemon), ademas hice que los usuarios www-data y daemon(usuarios de php en linux) tengan free pass ante solicitudes de contraseña y eso no resuelve mi inconveniente, y por si fuera poco, me he percatado que cuando realizo dicho proceso en la carpeta por defecto vendor/ .. /carpeta_de_jaspers puedo generar desde la terminal el dicho .pdf, pero he intentado las mismas pruebas en en public/reports, y ni por la terminal puedo obtener el .pdf, ademas de que si copio y pego el jasper generado en vendor/... , en la carpeta public/ .... , y lo intento desde alli.. ahora si se genera el .pdf, alguien tendra alguna santa idea? vuelvo a resaltar, que el codigo de linea de comando que se genera no tiene problemas, no me genera ningun tipo de error.&lt;/p&gt;&lt;p&gt;PD: Uso Laravel, y la libreria cassou para jaspeReports, intente tambien con la libreria phpjasperreport y nada.&lt;br&gt;&lt;br&gt;&lt;img alt=&quot;&quot; src=&quot;https://scontent-mia1-1.xx.fbcdn.net/v/t1.0-9/16508882_10155270378847841_5910438330960577655_n.jpg?oh=65e59d5c3cc65c7c82a44fdd181e44cf&amp;amp;oe=5949F1E8&quot; style=&quot;height:627px; width:588px&quot;&gt;&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/2025/generacion-de-reportes-en-pdf-con-jasperreports-y-linux</guid>
<pubDate>Sun, 05 Feb 2017 21:50:41 +0000</pubDate>
</item>
<item>
<title>Duda web php java</title>
<link>https://dudasprogramacion.com/1992/duda-web-php-java</link>
<description>&lt;p&gt;Hola,&lt;br&gt;Gracias a todos por la atención antes de nada.&lt;br&gt;&lt;br&gt;Estoy jugando con mi web y tengo un problema.&lt;br&gt;&lt;br&gt;Es esta: &lt;a href=&quot;http://www.merkaunion.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://www.merkaunion.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Como veís al pinchar en algún producto en la página principal se abre un frame enmedio de la pantalla para verlo.&lt;br&gt;&lt;br&gt;El caso es que Google enlace mis productos con el enlace original: Por ejemplo: &lt;a href=&quot;http://www.merkaunion.com/index.php?controller=mypage&amp;amp;id_product=3309&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://www.merkaunion.com/index.php?controller=mypage&amp;amp;id_product=3309&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;¿Cómo puedo hacer para que se vea exactamente igual entrando en el segundo enlace que como el primero, desplegado y la página principal detras?&lt;br&gt;&lt;br&gt;Uso prestashop.&lt;br&gt;&lt;br&gt;La forma con la que el sistema abre&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;&amp;lt;&lt;/span&gt;div id&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;&quot;img_desktop&quot;&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;										&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;&amp;lt;&lt;/span&gt;a rel&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;&quot;http:&lt;em&gt;//www&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;.&lt;/span&gt;merkaunion&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;.&lt;/span&gt;com/index&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;.&lt;/span&gt;php&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;?&lt;/span&gt;controller&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;=&lt;/span&gt;mypage&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;&amp;amp;&lt;/span&gt;id_product&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;{&lt;/span&gt;$product&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;.&lt;/span&gt;id_product&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;|&lt;/span&gt;intval&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;}&lt;/span&gt;&quot;&lt;/em&gt; class=&quot;product_img_link &lt;strong&gt;vista-rapida&lt;/strong&gt; noselect&quot; href=&quot;http://www.merkaunion.com/index.php?controller=mypage&amp;amp;id_product={$product.id_product|intval}&quot; title=&quot;{$product.name|escape:&#039;html&#039;:&#039;UTF-8&#039;}&quot; itemprop=&quot;url&quot;&amp;gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;
&lt;/pre&gt;&lt;pre&gt;
&lt;/pre&gt;&lt;pre&gt;&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;&amp;lt;&lt;/span&gt;img class&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;&quot;replace-2x img-responsive noselect&quot;&lt;/span&gt; src&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;&quot;{$link-&amp;gt;getImageLink($product.link_rewrite, $product.id_image, &#039;home_default&#039;)|escape:&#039;html&#039;:&#039;UTF-8&#039;}&quot;&lt;/span&gt; alt&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;&quot;{if !empty($product.legend)}{$product.legend|escape:&#039;html&#039;:&#039;UTF-8&#039;}{else}{$product.name|escape:&#039;html&#039;:&#039;UTF-8&#039;}{/if}&quot;&lt;/span&gt; title&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;&quot;{if !empty($product.legend)}{$product.legend|escape:&#039;html&#039;:&#039;UTF-8&#039;}{else}{$product.name|escape:&#039;html&#039;:&#039;UTF-8&#039;}{/if}&quot;&lt;/span&gt; &lt;span style=&quot;color:rgb(0, 0, 0)&quot;&gt;{&lt;/span&gt;if isset&lt;span style=&quot;color:rgb(0, 0, 0)&quot;&gt;(&lt;/span&gt;$homeSize&lt;span style=&quot;color:rgb(0, 0, 0)&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 0, 0)&quot;&gt;}&lt;/span&gt; width&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;&quot;{$homeSize.width}&quot;&lt;/span&gt; height&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;&quot;{$homeSize.height}&quot;&lt;/span&gt;&lt;span style=&quot;color:rgb(0, 0, 0)&quot;&gt;{&lt;/span&gt;/if&lt;span style=&quot;color:rgb(0, 0, 0)&quot;&gt;}&lt;/span&gt; itemprop&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color:rgb(204, 0, 0)&quot;&gt;&quot;image&quot;&lt;/span&gt; /&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;										&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;&amp;lt;&lt;/span&gt;/a&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;									&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;&amp;lt;&lt;/span&gt;/div&lt;span style=&quot;color:rgb(0, 0, 91)&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&lt;br&gt;La class que abre eso así es vista-rapida porque si la quito no funciona.&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;em&gt;La class que abre eso así es vista-rapida porque si la quito no funciona.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Solo veo referencias de ello en este .js.&lt;/em&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;function quick_view()&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;$(document).on(&#039;click&#039;, &#039;.quick-view:visible, .vista-rapida, .quick-view-mobile:visible&#039;, function(e){&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;e.preventDefault();&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;var url = this.rel;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;var anchor = &#039;&#039;;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (url.indexOf(&#039;#&#039;) != -1)&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;anchor = url.substring(url.indexOf(&#039;#&#039;), url.length);&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;url = url.substring(0, url.indexOf(&#039;#&#039;));&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (url.indexOf(&#039;?&#039;) != -1)&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;url += &#039;&amp;amp;&#039;;&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;url += &#039;?&#039;;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (!!$.prototype.fancybox)&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;$.fancybox({&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&#039;padding&#039;: &amp;nbsp;0,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&#039;width&#039;: &amp;nbsp; &amp;nbsp;1087,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&#039;height&#039;: &amp;nbsp; 610,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&#039;type&#039;: &amp;nbsp; &amp;nbsp; &#039;iframe&#039;,&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&#039;href&#039;: &amp;nbsp; &amp;nbsp; url + &#039;content_only=1&#039; + anchor&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;});&lt;br&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;});&lt;br&gt;}&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br&gt;Soy novato. No sé si hay forma de invocar eso de alguna manera.&lt;br&gt;Le he dado mil vueltas a todo. Si alguien puede ayudarme se lo agradecería un montón. Puedo pagar aunque sea 5€, no se. Gracias&lt;br&gt;&lt;br&gt;jajetin@gmail.com&lt;/p&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/1992/duda-web-php-java</guid>
<pubDate>Sat, 07 Jan 2017 22:06:57 +0000</pubDate>
</item>
<item>
<title>Respondido: Hola, quiero saber porque me sale este error, apenas voy iniciando</title>
<link>https://dudasprogramacion.com/1945/hola-quiero-saber-porque-sale-este-error-apenas-voy-iniciando?show=1991#a1991</link>
<description>Hola, fijate si no tenés todos los permisos, para que funcione debes tener 777 de permisos xq a veces el subir imagenes o archivos no funciona por eso, saludos</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/1945/hola-quiero-saber-porque-sale-este-error-apenas-voy-iniciando?show=1991#a1991</guid>
<pubDate>Thu, 05 Jan 2017 04:06:03 +0000</pubDate>
</item>
<item>
<title>Respondido: Chat privado con websocket</title>
<link>https://dudasprogramacion.com/1980/chat-privado-con-websocket?show=1981#a1981</link>
<description>Hola, acá encontré algo que te pueda servir para tu problema, Saludos.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.phpbuilder.com/articles/application-architecture/optimization/creating-real-time-applications-with-php-and-websockets.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://www.phpbuilder.com/articles/application-architecture/optimization/creating-real-time-applications-with-php-and-websockets.html&lt;/a&gt;</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/1980/chat-privado-con-websocket?show=1981#a1981</guid>
<pubDate>Tue, 03 Jan 2017 20:20:29 +0000</pubDate>
</item>
<item>
<title>convertir arrays simples en un solo array multidimensional</title>
<link>https://dudasprogramacion.com/1940/convertir-arrays-simples-en-un-solo-array-multidimensional</link>
<description>Tengo varias carpetas, cada una tiene un número como nombre. En cada una hay varias imágenes. &lt;br /&gt;
He hecho un código para guardar el path de las carpetas y la lista de archivos en dos arrays diferentes. No sé si es posible juntar los dos arrays en uno solo multidimensional. Lo intenté ocupando array_push, pero cuando intento acceder a los valores del array multidimensional la información no se muestra correctamente y aparece un aviso indicando undefined offset.&lt;br /&gt;
[code]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;?php&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//GUARDAR DIRECTORIOS&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//crear array para directorios numericos&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$pathDIR = &amp;quot;img/&amp;quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$DIR = Array(&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//guardar directorios numericos en array con foreach&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach (glob($pathDIR . &amp;#039;/[0-30]*&amp;#039;, GLOB_ONLYDIR) as $dirname) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$DIR[] = $dirname; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//mostrar los directorios numericos&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for($a = 0; $a &amp;lt; count($DIR); $a++) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//echo $DIR[$a] . &amp;quot;&amp;lt;br&amp;gt;&amp;quot;; &amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//GUARDAR IMAGENES&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//creo array para directorios&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$pathFILE = Array();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//creo arrays para imagenes &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$file = Array(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//inicio ciclo for&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for($b = 1; $b &amp;lt;= count($DIR); $b++) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$pathFILE[$b] = &amp;quot;img/&amp;quot; . $b . &amp;quot;/&amp;quot;; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//guardo las imagenes en array con foreach&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;foreach(glob($pathFILE[$b] . &amp;#039;*.jpg&amp;#039;) as $filename) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$file[] = $filename;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//muestro las imagenes&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for($c = 1; $c &amp;lt;= count($file); $c++) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//echo $file[$c-1] . &amp;quot;&amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//echo count($file) . &amp;quot;&amp;lt;br&amp;gt;&amp;quot;; &amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;array_push ($DIR, $file);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for($d = 0; $d &amp;lt;= count($DIR); $d++) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for($e = 0; $e &amp;lt;= count($DIR[$d]); $e++) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo $DIR[$d][$e] . &amp;quot;&amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;?&amp;gt;&lt;br /&gt;
[/code]</description>
<category>PHP</category>
<guid isPermaLink="true">https://dudasprogramacion.com/1940/convertir-arrays-simples-en-un-solo-array-multidimensional</guid>
<pubDate>Wed, 02 Nov 2016 16:26:45 +0000</pubDate>
</item>
</channel>
</rss>