Question: Hello, I need help passing my variable $title_length to $body_data using php to pass to HTML (using Mustache). The highlighted portion is what is not

Hello, I need help passing my variable $title_length to $body_data using php to pass to HTML (using Mustache). The highlighted portion is what is not workingeed help on. Thanks!

Hello, I need help passing my variable $title_length to $body_data using php

here is how it is passed in my HTML code:

to pass to HTML (using Mustache). The highlighted portion is what is

//displays final title in one string $length = strlen($title.$favorite_drink.$pets_name. $favorite_fictional_place. $favorite_real_place); //comments on title length if ($length >= 30) { $body_length = "That's a heck of a title!"; } if ($length $body_data; // return $body_length to $body_data $body_data = ['title' => $title, 'favorite_drink' => $favorite_drink, 'pets_name' => $pets_name, 'favorite_fictional_place' => $favorite_fictional_place, 'favorite_real_place' => $favorite_real_place, $body_length]; You are: {{title}} {{$favorite_drink}} {{pets_name}} {{favorite_fictional_place}} {{favorite_real_place}}. {{title_length}} digits of pi are {{pi}}{{digits}}... try again //displays final title in one string $length = strlen($title.$favorite_drink.$pets_name. $favorite_fictional_place. $favorite_real_place); //comments on title length if ($length >= 30) { $body_length = "That's a heck of a title!"; } if ($length $body_data; // return $body_length to $body_data $body_data = ['title' => $title, 'favorite_drink' => $favorite_drink, 'pets_name' => $pets_name, 'favorite_fictional_place' => $favorite_fictional_place, 'favorite_real_place' => $favorite_real_place, $body_length]; You are: {{title}} {{$favorite_drink}} {{pets_name}} {{favorite_fictional_place}} {{favorite_real_place}}. {{title_length}} digits of pi are {{pi}}{{digits}}... try again

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!