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!

here is how it is passed in my HTML code:

//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
Get step-by-step solutions from verified subject matter experts
