[wp-hackers] Small Problem in Echo Text

Navjot Singh navjotjsingh at gmail.com
Fri Feb 13 20:18:16 GMT 2009


Thanks for the Quick Fix.

Regards
Navjot Singh

On Sat, Feb 14, 2009 at 1:42 AM, Matt Martz <mdmartz at sivel.net> wrote:

> On Fri, Feb 13, 2009 at 3:09 PM, Navjot Singh <navjotjsingh at gmail.com>
> wrote:
> > I am writing a script for my font blog where I need to echo out a long
> img
> > tag containing a lot of php variables and also need to echo out the blog
> > url. But When I use the following, it doesn't parse the blog url. Pls
> > suggest, I am noob in PHP.
> >
> > echo "<img src=\"".bloginfo('url')."/render/font.php?text=A B C D E F G H
> I
> > J K L M N O P Q R S T U V W X Y
> >
> Z&font=".$id."&size=".$size."&color=".$color."&background=".$background."&transparent=".$transparent."&alias=".$alias."&max_width=".$max_width."&alignment=".$alignment."&leading=".$leading."&padding=".$padding."&vadj=".$vadj."&hadj=".$hadj."\"
> > alt=\"".$name."\" title=\"".$name."\" \n/>";
> >
> > It parses the blog url but it lists the following output in a strange
> > manner:
> >
> > http://localhost/newfont/blog<img src="/render/font.php?text=A B C D E F
> G H
> > I J K L M N O P Q R S T U V W X Y
> >
> Z&font=acmesab&size=12&color=#000&background=#FFF&transparent=false&alias=false&max_width=false&alignment=left&leading=0&padding=0&vadj=0&hadj=0"
> > alt="A.C.M.E. Secret Agent Bold Font" title="A.C.M.E. Secret Agent Bold
> > Font"
> > />
> >
> > Whereas the output should be:
> >
> > <img src="http://localhost/newfont/blog/render/font.php?text=A B C D E F
> G H
> > I J K L M N O P Q R S T U V W X Y
> >
> Z&font=acmesab&size=12&color=#000&background=#FFF&transparent=false&alias=false&max_width=false&alignment=left&leading=0&padding=0&vadj=0&hadj=0"
> > alt="A.C.M.E. Secret Agent Bold Font" title="A.C.M.E. Secret Agent Bold
> > Font"
> > />
> >
> > I am using this echo command inside a shortcode function which I would
> like
> > to use.
> >
> > Regards
> > Navjot Singh
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
>
> use get_bloginfo instead of bloginfo.
>
> --
> Matt Martz
> matt at sivel.net
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list