Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8097883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:54:10+00:00 2026-06-05T21:54:10+00:00

How to change the width/height if I have the following code and using php:

  • 0

How to change the width/height if I have the following code and using php:

<iframe src="http://player.vimeo.com/video/43598400" 
        webkitallowfullscreen="" 
        mozallowfullscreen="" 
        allowfullscreen="" 
        frameborder="0" 
        height="300" 
        width="500">
</iframe>

To:

<iframe src="http://player.vimeo.com/video/43598400" 
        webkitallowfullscreen="" 
        mozallowfullscreen="" 
        allowfullscreen="" 
        frameborder="0" 
        height="400" 
        width="680">
</iframe>

Usage is very limited, I want a simple replace solution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T21:54:11+00:00Added an answer on June 5, 2026 at 9:54 pm

    something like this:

    $iframe = '<iframe src="http://player.vimeo.com/video/43598400" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" frameborder="0" height="300" width="500"></iframe>';
    
    $newWidth = 680;
    $newHeight = 400;
    
    $iframe = str_replace('height="300"', 'height="' . $newHeight . '"', $iframe);
    $iframe = str_replace('width="500"', 'width="' . $newWidth . '"', $iframe);
    

    assuming you are certain that the original width and height will always be 500*300. if not you can try with preg_match()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following setup: <div>Element with CSS3 animated height change</div> <div><a href=#>Link</a></div> I
I'm able to change the width/height of the grid using this, so why won't
i have the following jquery code: $(document).ready(function() { $('.restrictiveOptions input[type!=checkbox], .restrictiveOptions select').change(function() { //
Suppose I have the following html: <div style=width:200px;height:200px;overflow:scroll> ... </div> If the stuff in
I have the following HTML code: <div class=outer_container> <div id=imgContainer> <img src=/some/image /> </div>
I'm using the following code to have a non-JS navigation: <ol id=navigation> <li id=home><a
I have the following code, i use the php file to read contents of
How can I change for example default width and height for buttons, etc?
I can't seem to change width in IE7 http://jsfiddle.net/Mkb9n/1/ You can see that all
I have successfully created video from uiimages using AVAssetWriter. But as soon as the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.