Check documentation for the latest version of dhtmlxSuite getCoords DHTMLX Docs

getCoords

Gets the cell coordinates in the specified format.

Parameters

  • $format - ('array', 'array_lit', 'array_assoc_lit', 'array_assoc') sets the format that the coordinates of the cell will be returned in

Return value

  • (array) the cell coordinates in the specified format

Example

$cell = new SpreadSheetCell($res, "1","B1", $db_prefix);
$coords = $cell->getCoords('array');

Details on the available format types

  • array

    Example:

    $cell = new SpreadSheetCell($res, "1","B1", $db_prefix);
    $cell->getCoords('array');

    Return value:

    array
    (
        "0" => 1,
        "1" => 2
    )
  • array_lit

    Example:

    $cell = new SpreadSheetCell($res, "1","B1", $db_prefix);
    $cell->getCoords('array_lit');

    Return value:

    array
    (
        "0" => 1,
        "1" =>'B'
    )
  • array_assoc

    Example:

    $cell = new SpreadSheetCell($res, "1","B1", $db_prefix);
    $cell->getCoords('array_assoc');

    Return value:

    array
    (
        "row" => 1,
        "column" => 'B'
    )
  • array_assoc_lit

    Example:

    $cell = new SpreadSheetCell($res, "1","B1", $db_prefix);
    $cell->getCoords('array_assoc_lit');

    Return value:

    array
    (
        "row" => 1,
        "column" => 2
    )
Back to top