Ayuda concatenar esto

  • Autor Autor rafadizeosp
  • Fecha de inicio Fecha de inicio
rafadizeosp

rafadizeosp

Mi
Verificación en dos pasos activada
Verificado por Binance
Me estoy volviendo loco tratando de concatenar esto

Insertar CODE, HTML o PHP:
echo "<a href='<?php $values = get_post_custom_values('mega'); echo $values[0]; ?>' target='_blank'><img src='http://soloterror.org/wp-content/uploads/2015/01/megalogo.png'/></a>";

Me imprime esto

OZqj8XZ.jpg
 
A mi me funciona perfectamente asi como esta pero haber intenta con este
PHP:
echo "<a href="<?php $values = get_post_custom_values('mega'); echo $values[0]; ?>" target='_blank'><img src='http://soloterror.org/wp-content/uploads/2015/01/megalogo.png'/></a>";
O también este
PHP:
echo "<a href="<?php $values = get_post_custom_values('mega'); echo $values[0]; ?>" target="_blank"><img src="http://soloterror.org/wp-content/uploads/2015/01/megalogo.png"/></a>";
o quizas este no se ni lo escribo ando con sueño pero alguno de estos quizás funcionen :sleeping:
PHP:
echo '<a href="<?php $values = get_post_custom_values('mega'); echo $values[0]; ?>" target="_blank"><img src="http://soloterror.org/wp-content/uploads/2015/01/megalogo.png"/></a>';
 
Última edición:
A mi me funciona perfectamente asi como esta pero haber intenta con este
PHP:
echo "<a rel="nofollow" href="<?php $values= get_post_custom_values('mega'); echo $values[0]; ?>" target='_blank'><img src='http://soloterror.org/wp-content/uploads/2015/01/megalogo.png'/></a>";
O también este
PHP:
echo "<a rel="nofollow" href="<?php $values= get_post_custom_values('mega'); echo $values[0]; ?>" target="_blank"><img src="http://soloterror.org/wp-content/uploads/2015/01/megalogo.png"/></a>";
o quizas este no se ni lo escribo ando con sueño pero alguno de estos quizás funcionen :sleeping:
PHP:
echo '<a rel="nofollow" href="<?php $values= get_post_custom_values('mega'); echo $values[0]; ?>" target="_blank"><img src="http://soloterror.org/wp-content/uploads/2015/01/megalogo.png"/></a>';

Los 3 me tiran errores.
 
[MENTION=17745]rafadizeosp[/MENTION]

PHP:
echo '<a href="<?php $values = get_post_custom_values(\'mega\'); echo $values[0]; ?>" target="_blank">
<img src="http://soloterror.org/wp-content/uploads/2015/01/megalogo.png"/></a>';

Prueba de esta manera :encouragement:
 
Me estoy volviendo loco tratando de concatenar esto

Insertar CODE, HTML o PHP:
echo "<a href='<?php $values = get_post_custom_values('mega'); echo $values[0]; ?>' target='_blank'><img src='http://soloterror.org/wp-content/uploads/2015/01/megalogo.png'/></a>";

Me imprime esto

OZqj8XZ.jpg

Insertar CODE, HTML o PHP:
 $values = get_post_custom_values('mega');
echo "<a href='".$values[0]."' target='_blank'><img src='http://soloterror.org/wp-content/uploads/2015/01/megalogo.png'/></a>";
 
Esta funciona.
PHP:
$values = get_post_custom_values('mega'); 

echo '<a href="' .$values .'" target="_blank"><img src="http://soloterror.org/wp-content/uploads/2015/01/megalogo.png"/></a>';

Suerte
 
[MENTION=17745]rafadizeosp[/MENTION]

PHP:
echo '<a rel="nofollow" href="<?php $values= get_post_custom_values(\'mega\'); echo $values[0]; ?>" target="_blank">
<img src="http://soloterror.org/wp-content/uploads/2015/01/megalogo.png"/></a>';

Prueba de esta manera :encouragement:

No me da error pero no se forma el link correctamente

- - - Actualizado - - -

Insertar CODE, HTML o PHP:
 $values = get_post_custom_values('mega');
echo "<a href='".$values[0]."' target='_blank'><img src='http://soloterror.org/wp-content/uploads/2015/01/megalogo.png'/></a>";

Este sí me funcionó, muchas gracias!
 
Atrás
Arriba