PHP: Adding echo contents inside an other

PHP: Adding echo contents inside an other



I am using one php echo to add a meta tag og:image as follows:

echo "<meta property=\"og:image\" content=\"$b/$new/imagename-$b-$new-$three.jpg\" />";

and echos this image url:


And I started using phpThumb to resize the image dimensions in the url parameters (as I didnt find an easiter way), and the echo is:

echo '<img src="'.htmlspecialchars(phpThumbURL('src=', '/phpThumb/phpThumb.php')).'">';

What I need to do is merge the 2 echo (without img src part) inside the first!

I tried a lot, and what I want is something like:


echo "<meta property="og:image" content="'.htmlspecialchars(phpThumbURL('src=$b/$new/imagename-$b-$new-$three.jpg&w=100&h=200&iar=1', '/zJ/phpThumb/phpThumb.php')).'" />";


Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Hire Dedicated PHP Developer

Looking to hire affordable yet experienced PHP developers? **[Hire Dedicated PHP Developer]( "Hire Dedicated PHP Developer")**, who can convert your idea to reality, within the stipulated...

PHP Web Application Development Company

As a top **PHP Web Application Development Company in USA**[]( ""), we at Data EximIT have...

How to use highchart in php with example

Here, i will let you know that how to use highchart in php application with example. Highchart provides feature to draw different type of charts.

Advantages of Hiring PHP Developer for your Website Project

PHP - Hypertext pre-processor, a scripting language used by many people in developing web pages, but most of us are unaware even of the full form. To train someone and make them learn this whole language is as difficult and time-consuming as it is...

PHP Website Development

Skenix Infotech is a leading PHP Web Development Company that helps companies get results with industry best practices. Get affordable PHP Development Services.