Search Results

Search found 102 results on 5 pages for 'syom'.

Page 2/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • highlight the word in the string, if it contains the keyword

    - by Syom
    how write the script, which menchion the whole word, if it contain the keyword? example: keyword "fun", string - the bird is funny, result - the bird is * funny*. i do the following $str = "the bird is funny"; $keyword = "fun"; $str = preg_replace("/($keyword)/i","<b>$1</b>",$str); but it menshions only keyword. the bird is *fun*ny

    Read the article

  • problem with printf() function

    - by Syom
    i have the variable $a = 5; i want to show it in binary form, with length, equal 8, with writing * at white spaces, just like this, like this * * * * *101 here the script $number = 5; printf("%*8b", $number); it doesn't work with *, but if "0"-s it works printf("%08b", $number); //returns 00000101 why it doesn't work with *?

    Read the article

  • how can i put an image into select?

    - by Syom
    i have this script <select> <option value="1">one<img src="star.gif" height="15" width="15"></img> </option> </select> but it doesn't work. how can i put an image into select? thanks update: so it's impossible?:(

    Read the article

  • GLOBAL problem with javascript

    - by Syom
    There is some problem, i can't understand anyway. look at this code please <script type="text/javascript"> function math(x) { var y; y = x*10; alert(y); } </script> <input type="button" onclick="math(0.011)"> What must be alerted after i click on button? i think 0.11, but no, it alerts 0.10999999999999999 explain please this behavior. thanks in advance

    Read the article

  • how calculate the count of views?

    - by Syom
    just yesterday i finished one site, which provides video watching. but now i need to show the number of views of each film. i never wrote such thing, so i don't know what to do. maybe i must add one field in mysql database, and increase it every time the video opened? but i use flash player, and i can't wrote script onclick of player. so, could you give me an idea... thanks

    Read the article

  • php: geting ip addres

    - by Syom
    i want to get an ip addres of visitors. could you tell me what element of $_SERVER[] i should use? $_SERVER['HTTP_CLIENT_IP']; $_SERVER['HTTP_X_FORWARDED_FOR']; or $_SERVER['REMOTE_ADDR']; thanks

    Read the article

  • mysql: select ... where id = any value. is it possible?

    - by Syom
    look at this table please table |id| |name| |order| i must get the rows, where name = something and order = somevalue so i write select `id` from `table` where `name` = 'something' and `order` = 'somevalue' but depend on php logic, sometimes i need to get all rows, where name = somethimg, independently of order value. i don't want to change the query structure, because in practise there are many number of fields, and possible count of queries will became very big. so i want to save the structure of query, and when i need to select just by name, i want to write something like this select `id` from `table` where `name` = 'something' and `order` = any value is it possible? maybe the question is incomprehensible, at least i tried;) sorry for bad english thanks

    Read the article

  • date() function problem

    - by Syom
    i use date function to get day, month and year. $year = date(y); $month = date(m); $day = date(d); but my hosting is in another place where i am, so i need to add 11 hours. could you tell me how can i do that? thanks

    Read the article

  • Image cropping problem

    - by Syom
    When I copy a layer in photoshop, then I want to merge it with canvas, I crop it, but it's getting smaller. I want to save its original size! Could you help me please?

    Read the article

  • php: session_start() error

    - by Syom
    I have a file, which starts <?php session_start();?>, and it returns an error Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp2\htdocs\index.php:1) in C:\xampp2\htdocs\index.php on line 3 and now take a look at the moment, i can't anderstand anyway when i copy the all content of my file into another file, it start working. can somebody explain how can it happen. thanks update i havent't any white spaces, at least i can't see them

    Read the article

  • Ajax, Html: can't generate the content of SELECT tag

    - by Syom
    i have the following html code <select id="c0" name="countries" onchange="show_other()"> <option value="1">something</option> <div id="c1"> </div> </select> i have the option "something", and i want to generate other options via Ajax. but if i try to this document.getElementById('c1').innerHTML = xmlhttp.responseText it doesn't work, but document.getElementById('c0').innerHTML = xmlhttp.responseText works fine, but i need to keep the first option. could you explain what is the problem? thanks

    Read the article

  • php: save me from dissapointment

    - by Syom
    i'm being dissapointed in programming when some issues can't be placed in my mind. i have file, which starts <?php session_start();?>, and it returns an error Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp2\htdocs\index.php:1) in C:\xampp2\htdocs\index.php on line 3 and now take a look at the moment, i can't anderstand anyway when i copy the all content of my file into another file, it start working. can somebody explain how can it happen. thanks

    Read the article

  • problems with strtolower function

    - by Syom
    i have some text in foreign language in my page, but when i make it lowercase, it starts to look like this... $a = "????? ?????????" echo $b = strtolower($a); //returns ????? ????????? i've set <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> could you tell me why? thanks in advance

    Read the article

  • uploading problem

    - by Syom
    i can't upload large files, but i've set php.ini max_execution_time = 3600 max_input_time = 600 memory_limit = 100M post_max_size = 100M file_uploads = On upload_max_filesize = 100M it returns a 500 error - [an error occurred while processing this directive] could you say why? thanks

    Read the article

  • programming question about numbers

    - by Syom
    it's a task, on which i think during whole day. i have four integer numbers a, b, c, d, and ineger x[1,40]. i must write a program, which can find the values of {a,b,c,d}, for which one of following equations is true for any (x<=40, x=1) x=a or x=b or x=a+b or x=a+b+c+d or x+a=c+d or x+a+b=c+d or ... x+a+b+c=d or ... it is very difficult to explain what i want to say. maybe the example will be helpful. example: if x=17, by {a=1,b=2,c=5,d=15} i can write x+a+b=c+d whole question is to present any x[1,40] by {a,b,c,d}. hope that you understand what i want to say, and thanks in advance

    Read the article

  • grabing data from url

    - by Syom
    i have a task - i must grab some data from the URL. the link is http://cba.am. the data, i want to take, are in the some table, and i have the only one identifier, to reach my wanted data, it's the word "usd", which writes in that table(html)! i've written the following script, and it works! but i never heard how more experienced programers do such things, so i want to hear your comments. here is script <?php $str = file_get_contents("http://cba.am/"); $key_usd = "USD"; $sourse_usd_1 = explode($key_usd,$str); $usd1 = $sourse_usd_1[2]; $sourse_usd_2=explode(">",$usd1); $usd2 = $sourse_usd_2[4]; $sourse_usd_3=explode("<",$usd2); $usd = $sourse_usd_3[0]; ?> sorry for poor english:)

    Read the article

  • php: security question

    - by Syom
    in my cms i have index.php, where client must enter username and password. if they are correct, he'll moove to admin.php, where the cms is. but now hacker can enter to cms/admin.php, so my security now is awful. i know, that i can use $_SESSION variable. index.php - i can give some value to $_SESSION['error']: $_SESSION['error'] = TRUE, and in admin.php just verify it admin.php if($_SESSION['error'] == TRUE) { my script here... } else header("Location: index.php"); but i want to rich this effect without SESSION. could you give me an idea, how can i do it? thanks

    Read the article

  • align="right" doesn't work in xml

    - by Syom
    i've never used xml before, and now i must chenge the align of text. i try to do it like in html, but it doesn't happen. maybe i do something wrong? here is he script <gallery> <title><![CDATA[<FONT SIZE="20" COLOR="#C3A25D"></FONT>]]></title> <text><![CDATA[<FONT SIZE="20" COLOR="#C3A25D">text, which i want to to be in right position</FONT>]]></text> <thmb></thmb> <img wdt="421">images/avetiskhakhamyan.jpg</img> </gallery> i try to write align="right" in <font> tag, but it deosn't work. could you tell me what is the problem? thanks

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >