试图在php中插入php

时间:2012-07-28 21:15:42

标签: php string

我试图在这个php字符串中使用双引号和单引号。但是,没有成功。我如何在php中调用php?

<?php echo wpws_get_content('<?php the_field('rate_my_professor_link''); ?>','.comment','html','user_agent=Bot+at+mysite.com&on_error=error_show&')?>

1 个答案:

答案 0 :(得分:4)

你只需要这样做:

<?php echo wpws_get_content(the_field('rate_my_professor_link'), '.comment', 'html', ''user_agent=Bot+at+mysite.com&on_error=error_show&'); ?>

您可以将函数直接放入其他函数中。